Hammerspoon/hammerspoon

hotkey.modal that ignores anything but given hotkeys

オープン

#1,505 opened on 2017/07/30

 (12 件のコメント) (0 件のリアクション) (1 人の担当者)Objective-C (688 件のフォーク)batch import
enhancementhelp wanted

Repository metrics

Stars
 (15,415 個のスター)
PR merge metrics
 (PR metrics pending)

説明

Is it possible to have a hs.hotkey.modal with a few bindings that would ignore all the other keys. Let's say if I have:

local myModal = hs.hotkey.modal.new({"cmd"}, "space")
myModal:bind("", "g", nil, openGoogleChrome())
myModal:bind("", "f", nil, openFirefox())
myModal:bind("", "s", nil, openSafari())

Then if I press cmd+space, it will activate the modal, in which it would only respond to g, f, and s. Any other keys would be simply ignored. Is that even possible?

コントリビューターガイド