]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/KeyEvents.py
Better capture of unicode character events
[wxWidgets.git] / wxPython / demo / KeyEvents.py
index 87f70039b9418321dc0bdb155c9df01a70f694a7..71acdf2294801ff9d8b2be85fd775b07d1e55f84 100644 (file)
@@ -226,7 +226,10 @@ 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()) + "\""
                 
             elif keycode < 256: