Is it possible to assign a global hotkey to a specific feature in an Adobe AIR app, i.e. the app feature responds to the hotkey whether the app is active or not (it must be running of course, but only in the system tray).
Asked
Active
Viewed 2,200 times
3 Answers
4
I don't this it's possible with Adobe AIR itself. The only method I can think of:
- Install 3rd party hotkey application (like AutoHotkey or HotKeyBind)
- Configure hotkey application to make CTRL+ALT+Q to launch
"
c:\programs\thvo42\coolapp.exe --hotkey q
" - In your AIR application, register for the NativeApplication.invoke event, and watch for arguments like '--hotkey q' to know that the Q hotkey was pressed, and then act accordingly.
Of course, this is kind of a hassle, maybe with some hacking you can roll it all into a single install file.
-
Thanks, this should work for now. The key thing about invoke is: "When an application is invoked a second time, another instance of the application is not started. Instead, the first instance receives an additional invoke event." (Source: Adobe AIR docs linked above) – thvo Oct 05 '08 at 03:58
1
From the Reference Manual:
To listen globally for key events, listen on the Stage for the capture and target or bubble phase.

dkretz
- 37,399
- 13
- 80
- 138
-
globally within the AIR app, or the entire desktop? I'm pretty sure the Stage only responds to keypresses if the AIR app is in focus. – chamberlainpi Jun 21 '13 at 12:18
0
SWFKit creates a wrapper around your flash/flex movie, and allows access to system DLLs and other goodies, but unfortunately it would export as an .exe, so windows only and no AIR.
ASFAIK, there is no support for it by using AIR alone.

producerism
- 344
- 4
- 17