I have ListCtrl and I want to be able to detect if user has pressed Ctrl-A to select all items in the list. I have following code:
def __init__(self, parent):
self.Bind(wx.EVT_KEY_UP, self.kbEvent)
def kbEvent(self, event):
keycode = event.GetKeyCode()
mstate = wx.GetMouseState()
...
elif keycode == 65 and mstate.GetModifiers() == wx.MOD_CONTROL:
self.selectAll()
...
event.Skip()
But, it does not work with russian layout on (at least in linux, with wxwidgets 4.0.6). Russian “Ф” is on the same key as english “A”. GetKeyCode()
returns 0 for that, just like intended according to docs. GetUnicodeKey()
returns 1092.
How do I detect if “A” key has been pressed regardless of current active layout?