XModifierKeys
XModifierKeys is a library to obtain status of modifier keys.
This library allow to your scripts change the behavior depending of the status of modifier keys.
use XModifierKeys : script "XModifierKeys"
delay 1 -- provide time to press keys
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
History
- 1.0 -- 2020-04-07
- First release.