]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/KeyEvents.py
Don't use the PyGILState_* APIs with Python 2.3, it causes a problem
[wxWidgets.git] / wxPython / demo / KeyEvents.py
index 1ca318a327aef5df669064090f0cff8b43b5c1d3..2c72a3a911d616948a32a231b2157e3d661176a8 100644 (file)
@@ -226,15 +226,16 @@ class KeyLog(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin):
         keycode = evt.GetKeyCode()
         keyname = keyMap.get(keycode, None)
         if keyname is None:
-            if keycode < 256:
+            if "unicode" in wx.PlatformInfo and keycode < 128:
+                keyname = "\"" + unichr(evt.GetUnicodeKey()) + "\""
+                
+            elif keycode < 256:
                 if keycode == 0:
                     keyname = "NUL"
                 elif keycode < 27:
                     keyname = "Ctrl-%s" % chr(ord('A') + keycode-1)
                 else:
                     keyname = "\"%s\"" % chr(keycode)
-            elif "unicode" in wx.PlatformInfo:
-                keyname = "\"" + unichr(keycode) + "\""
             else:
                 keyname = "unknown (%s)" % keycode