events - Cocoa/Carbon: catch global hotkey when key is kept pressed (held down) -
using installapplicationeventhandler
, registereventhotkey
carbon framework, i'm able catch whatever key want.
on contrary can't find way handle correctly event when key held down (kept pressed). mean, when held down key, registereventhotkey
responds if have pressed , released key; want it, instead, send "event" continuously until key released.
what want achieve, precise, when key kept pressed this:
as key pressed , held down want installapplicationeventhandler
, registereventhotkey
create event not once (as have now) every x milliseconds or until key released.
the particular keys i'm considering not modifier keys.
can me? i'm becoming crazy on this!
maybe start firing timer every 0.25 seconds or checks see if appropriate keys still down. if are, re-invoke action. otherwise, invalidate timer.
Comments
Post a Comment