Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

vg-gb

macrumors newbie
Original poster
Nov 5, 2013
2
0
I'm working on a "status bar" application.

I want to switch my app into "mode B" whenever the Command ⌘ key is pressed (and released: keyDown + keyUp). Globally.

Command + <Key> combinations should work as usual.

"Mode B" lasts only 3 seconds. Within this period the app catches all keyboard events. Active application focus should not change.

I'm a beginner, don't know where to start.

Any thoughts about that? Please, help!
 
So essentially you are asking for help making an app with a secret keylogger function? I don't think that's wise...
 
So essentially you are asking for help making an app with a secret keylogger function?

Keylogger? Nope! I just want to use combinations of Command + <key> without interference with any other predefined ⌘-combinations.

I believe that the only way to do this is to release "Command" before pressing a meaningful key. Useability hack, nothing more.
 
Last edited:
There's no high level way of doing this, and I haven't done this kind of thing in several months, but I believe the terms you should search for are "Event Taps".
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.