#12354 closed enhancement (fixed)
Implement RegisterHotKey for operating systems other than Windows
| Reported by: | Q | Owned by: | csomor |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | base | Version: | stable-latest |
| Keywords: | RegisterHotKey simple | Cc: | jekis@… |
| Blocked By: | Blocking: | ||
| Patch: | no |
Description
There are a few platform-specific methods for obtaining this functionality--many of these, such as using PyObjC and the Mac OSX Native hotkey event code are incompatible with WX as they require their own event loop be run in the main thread. I ask that the WX version of RegisterHotKey is updated to work on OSX and X11.
Change History (16)
comment:1 Changed 11 years ago by vadz
- Milestone 2.9.2 deleted
- Priority changed from normal to low
- Status changed from new to confirmed
comment:2 Changed 11 years ago by Q
Here is a link to registration of global hotkeys on OSX using Objective C: http://snippets.aktagon.com/snippets/361-Registering-global-hot-keys-with-Cocoa-and-Objective-C
I have been unable to find specific reference code for X11, simply confirmations that is possible using xlib. Thank you very much for your time and assistance with this.
comment:3 Changed 11 years ago by JEkis
- Cc jekis@… added
comment:4 Changed 10 years ago by seanybob
- Priority changed from low to normal
Google groups thread that referred me here:
http://groups.google.com/group/wx-users/browse_thread/thread/baa9cdc7d251ce7a#
Code suggested in thread that might help for OSX:
http://visor.binaryage.com/
Sadly, I can't help much with this, being MAC/ObjC-challenged myself. Just wanted to let people know that there is an active interest in this feature from the community though, if someone has the ability to add it.
comment:5 Changed 10 years ago by vadz
- Keywords simple added
FWIW this seems pretty straightforward to do so anybody minimally fluent in C* should be able to add implementation of this without too much problems... I might do it myself in the future but I have a lot of higher priority tickets to look at first so please don't hesitate to preempt me.
comment:6 Changed 10 years ago by ronarts12
I'd like to add a me too... I'll look into adding the functionality myself if I find the time to learn about OSX development...
comment:7 Changed 10 years ago by csomor
- Owner set to csomor
- Status changed from confirmed to accepted
comment:8 Changed 10 years ago by seanybob
Just wanted to make sure this ticket's existence is still known. I see that Csomor accepted it but haven't seen any updates in a couple months (Not intending to be rude, but just checking in - I'm sure Csomor is a busy guy!)
comment:9 Changed 10 years ago by SC
comment:10 Changed 10 years ago by csomor
please - everybody who was interested in this - test the current implementation and report back - thanks
comment:11 Changed 10 years ago by robind
There does not appear to be a way to turn on wxUSE_HOTKEY via configure.
comment:12 Changed 10 years ago by VZ
comment:13 Changed 10 years ago by robind
- Resolution set to fixed
- Status changed from accepted to closed
It seems to be working well, at least on wxOSX-Cocoa, so I'll go ahead and close this ticket.
My test case is here: http://trac.wxwidgets.org/browser/wxPython/trunk/sandbox/test_hotkey.py
comment:14 Changed 6 years ago by HighCommander4
Does this remain unimplemented on Linux? It's not clear, as the bug title talks about "operating systems other than Windows", but the linked patches only refer to OS X.
comment:15 Changed 6 years ago by Vadim Zeitlin <vadim@…>
comment:16 Changed 6 years ago by vadz
Yes, it's still not implemented in wxGTK, but I don't know how to implement it there.

Pointers to the documentation about implementing this functionality would be welcome.