X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7db509e27e4478251a9947a2c0d25f2188212806..6a52ea5cb81dcd07c286d34b80945534780fe05f:/wxPython/demo/KeyEvents.py diff --git a/wxPython/demo/KeyEvents.py b/wxPython/demo/KeyEvents.py index 2c72a3a911..71acdf2294 100644 --- a/wxPython/demo/KeyEvents.py +++ b/wxPython/demo/KeyEvents.py @@ -122,7 +122,7 @@ class KeySink(wx.Window): self.SetBackgroundColour(wx.BLUE) self.haveFocus = False - self.callSkip = False + self.callSkip = True self.logKeyDn = True self.logKeyUp = True self.logChar = True @@ -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: @@ -315,6 +318,7 @@ class TestPanel(wx.Panel): cb1 = wx.CheckBox(self, -1, "Call evt.Skip in Key* events") self.Bind(wx.EVT_CHECKBOX, self.OnSkipCB, cb1) + cb1.SetValue(True) cb2 = wx.CheckBox(self, -1, "KEY_UP") self.Bind(wx.EVT_CHECKBOX, self.OnKeyUpCB, cb2)