[PATCH 2/2] winemac: Implement support for global hot keys.

Vincent Povirk madewokherd at gmail.com
Thu Sep 19 23:08:20 CDT 2013

I don't think this is going to work correctly when replacing hotkeys
(by passing an already-registered hwnd and id to RegisterHotKey with a
different key combination). Since the user driver's RegisterHotKey
function will be called with the new id/vkey/flags before
UnregisterHotKey is called for the existing hotkey's id/vkey/flags,
the user driver has to distinguish them based on vkey/flags.

I think you can still get away with a mapping with hwnd/id as keys, as
long as you check for matching vkey/flags when you unregister a

(Of course, I'm not convinced the user driver should ever post
WM_HOTKEY, since the input should go through low-level keyboard hooks
first, which is why I did not include the id as an argument to these
entry points. If we decided to pass the id through, there would
technically be no need for RegisterHotKey to call the user driver's
UnregisterHotKey in this case.)

More information about the wine-devel mailing list