Home > XModules >

必要なシステム

  • OS X 10.9 以降
    • macOS 10.14.6 で開発/テストをしています。

ダウンロード

Version 1.0 -- 2020-04-15

依存モジュール

XModifierKeys

XModifierKeys は現在の修飾キー(コマンドキーとかコントロールキーとか)の押し下げ状態を取得するライブラリです。

修飾キーの状態で動作を切り替えるスクリプトの作成に使ってください。

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

更新履歴

  • 1.0 -- 2020-04-07
    • 初公開