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!
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
888
Harrogate
So essentially you are asking for help making an app with a secret keylogger function? I don't think that's wise...
 

vg-gb

macrumors newbie
Original poster
Nov 5, 2013
2
0
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:

ArtOfWarfare

macrumors G3
Nov 26, 2007
9,234
5,294
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.