Skip to content

Instantly share code, notes, and snippets.

View quadrupleslap's full-sized avatar

Ram quadrupleslap

  • Sydney, Australia
View GitHub Profile
@Grayson
Grayson / isOptionKeyPressed.scpt
Created August 18, 2011 14:03
Applescript snippet to test if Option key is held down.
on isOptionKeyPressed()
return (do shell script "/usr/bin/python -c 'import Cocoa; print Cocoa.NSEvent.modifierFlags() & Cocoa.NSAlternateKeyMask > 1'") is "True"
end isOptionKeyPressed