|
⇤ ← Revision 1 as of 2006-09-15 01:18:30
Size: 1841
Comment:
|
← Revision 2 as of 2008-03-11 10:50:32 ⇥
Size: 1845
Comment: converted to 1.6 markup
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 17: | Line 17: |
| Microsoft has documented their behaviour very well. See for example [http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwui/html/BestPracticesforSupportingMicrosoftMouseandKeyboardDevices.asp this article] from MSDN. They defined a few new windows messages for this. To handle these messages I think you need to hook into the raw windows message flow (see HookingTheWndProc). I'm not an expert on wxPython, so I don't know if there's a better way of doing it. The message you need to detect is the [http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/keyboardinput/keyboardinputreference/keyboardinputmessages/wm_appcommand.asp WM_APPCOMMAND], which has the numerical ID 0x0319. |
Microsoft has documented their behaviour very well. See for example [[http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwui/html/BestPracticesforSupportingMicrosoftMouseandKeyboardDevices.asp|this article]] from MSDN. They defined a few new windows messages for this. To handle these messages I think you need to hook into the raw windows message flow (see HookingTheWndProc). I'm not an expert on wxPython, so I don't know if there's a better way of doing it. The message you need to detect is the [[http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/keyboardinput/keyboardinputreference/keyboardinputmessages/wm_appcommand.asp|WM_APPCOMMAND]], which has the numerical ID 0x0319. |
Many modern mice and keyboard have more or less useful fancy extra buttons, like forward and backwards buttons used when browsing the Internet. Unfortunately, the hardware manufacturers haven't agreed on a standard for handling these mice, which makes it hard for application programmers to add support for such buttons.
On Windows
Logitech devices
These drivers emit key combinations; alt+numpad right for forward, alt+numpad left for backwards. To handle this, you just need a handler for wx.EVT_CHAR:
Microsoft devices
Microsoft has documented their behaviour very well. See for example this article from MSDN. They defined a few new windows messages for this. To handle these messages I think you need to hook into the raw windows message flow (see HookingTheWndProc). I'm not an expert on wxPython, so I don't know if there's a better way of doing it. The message you need to detect is the WM_APPCOMMAND, which has the numerical ID 0x0319.
I have no idea how to implement similar behaviour on linux, but feel free to add that. Or if you have a better way of handling the WM_APPCOMMAND.
