X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/33971536c5f047ee95ec7376fd84b5f7054c05e1..822e03eeffe940efdcae10f44f46bd49e6f76131:/wxPython/demo/KeyEvents.py diff --git a/wxPython/demo/KeyEvents.py b/wxPython/demo/KeyEvents.py index 1ca318a327..2c72a3a911 100644 --- a/wxPython/demo/KeyEvents.py +++ b/wxPython/demo/KeyEvents.py @@ -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