XModifierKeys Reference
XModifierKeys is a library to obtain status of modifier keys.
This library allow to scripts change the behavior depending of the status of modifier keys.
Example
use XModifierKeys : script "XModifierKeys"
delay 1
tell (make XModifierKeys)
if is_command_pressed() then log "Command key is pressed"
if is_option_pressed() then log "Option key is pressed"
if is_control_pressed() then log "Control key is pressed"
if is_function_pressed() then log "Function key is pressed"
if is_shift_pressed() then log "Shift key is pressed"
if is_capslock_pressed() then log "Caps lock key is pressed"
end tell
Constructor Method
Make an instance of XModifierKeys and caputre current status of modifier keys.
Instance Methods
Return true if command key is pressed.
Return true if option key is pressed.
Return true if control key is pressed.
Return true if function key is pressed.
Return true if shift key is pressed.
Return true if caps lock is on.