I do not understand why the following code (snippet) fails to capture some of my keyboard keys (HP Pavilion laptop):
import wx
import sys
import locale # To handle Swedish KB
locale.setlocale(locale.LC_ALL,'' )
print 'Python version: %s\n' %sys.version
print 'wxPython version: %s\n' %wx.version()
...
self.Bind(wx.EVT_KEY_DOWN, self.onKeyDown)
...
def onKeyDown(self,evt):
keycode = evt.GetKeyCode()
print keycode
...
This does capture many of the keys; but, fails to capture the arrow keys (for example).
How can I capture ALL KEY hit?
Note:
* Python version: 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)]
* wxPython version: 2.8.12.1 (msw-unicode)
* Windows 7