OSX Key codes for RegisterHotKey?

I installed this build:

https://groups.google.com/forum/#!topic/wxpython-dev/TNApwkBBMCY/discussion

Which has this implemented in it:

http://trac.wxwidgets.org/ticket/12354

On Mac OSX Snow Leopard 10.6.8.

The function RegisterHotKey seems to run properly, save that I am not passing it the right parameters.

From this example:

http://wiki.wxpython.org/RegisterHotKey

The keycodes are obtained through win32con in that app. In trying to test out the demo program on a Mac, I’m having a heck of a time getting the ‘right’ keycodes. I’ve tried hardcoding in the values I obtained using this app (http://manytricks.com/keycodes/), but no dice. I’ve tried passing ASCII values, Unicode values, WXK_, It’s possible the mistake is on my part though.

Any thoughts on this?

Thanks again for your help.

The problem is that the wxUSE_HOTKEY flag is not being turned on automatically for osx builds, and it doesn't look like there is a way to turn it on via configure, so even though the code is there in wx, it is not being compiled for normal builds.

We've fixed that and now RegisterHotKey is working as expected on OSX, this will be available in the next 2.9 release. You can see it in action in this little test script:

http://trac.wxwidgets.org/browser/wxPython/trunk/sandbox/test_hotkey.py

···

On 8/28/11 7:10 AM, Emeth wrote:

I installed this build:
Redirecting to Google Groups

Which has this implemented in it:
wxTrac has been migrated to GitHub Issues - wxWidgets

On Mac OSX Snow Leopard 10.6.8.

The function RegisterHotKey seems to run properly, save that I am not
passing it the right parameters.

From this example:

RegisterHotKey - wxPyWiki

The keycodes are obtained through win32con in that app. In trying to
test out the demo program on a Mac, I'm having a heck of a time getting
the 'right' keycodes. I've tried hardcoding in the values I obtained
using this app (Key Codes · Many Tricks), but no dice. I've
tried passing ASCII values, Unicode values, WXK_, It's possible the
mistake is on my part though.

Any thoughts on this?

--
Robin Dunn
Software Craftsman