]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/KeyEvents.py
Treat Ctrl-Shift-Backspace the same as ESC in the shell.
[wxWidgets.git] / wxPython / demo / KeyEvents.py
index 87f70039b9418321dc0bdb155c9df01a70f694a7..1b55200099f4311e28d9c1ab652a585fe341a36f 100644 (file)
@@ -226,8 +226,13 @@ class KeyLog(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin):
         keycode = evt.GetKeyCode()
         keyname = keyMap.get(keycode, None)
         if keyname is None:
-            if "unicode" in wx.PlatformInfo and keycode < 128:
+            if "unicode" in wx.PlatformInfo:
+                keycode = evt.GetUnicodeKey()
+                if keycode <= 127:
+                    keycode = evt.GetKeyCode()
                 keyname = "\"" + unichr(evt.GetUnicodeKey()) + "\""
+                if keycode < 27:
+                    keyname = "Ctrl-%s" % chr(ord('A') + keycode-1)
                 
             elif keycode < 256:
                 if keycode == 0: