Hammerspoon/hammerspoon

hotkey.modal that ignores anything but given hotkeys

Open

#1505 aperta il 30 lug 2017

Vedi su GitHub
 (12 commenti) (0 reazioni) (1 assegnatario)Objective-C (688 fork)batch import
enhancementhelp wanted

Metriche repository

Star
 (15.415 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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?

Guida contributor