projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
wxDisplay build fix for missing Direct Draw.
[wxWidgets.git]
/
wxPython
/
demo
/
KeyEvents.py
diff --git
a/wxPython/demo/KeyEvents.py
b/wxPython/demo/KeyEvents.py
index 2c72a3a911d616948a32a231b2157e3d661176a8..1b55200099f4311e28d9c1ab652a585fe341a36f 100644
(file)
--- 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.SetBackgroundColour(wx.BLUE)
self.haveFocus = False
- self.callSkip =
Fals
e
+ self.callSkip =
Tru
e
self.logKeyDn = True
self.logKeyUp = True
self.logChar = True
self.logKeyDn = True
self.logKeyUp = True
self.logChar = True
@@
-226,8
+226,13
@@
class KeyLog(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin):
keycode = evt.GetKeyCode()
keyname = keyMap.get(keycode, None)
if keyname is None:
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()) + "\""
keyname = "\"" + unichr(evt.GetUnicodeKey()) + "\""
+ if keycode < 27:
+ keyname = "Ctrl-%s" % chr(ord('A') + keycode-1)
elif keycode < 256:
if keycode == 0:
elif keycode < 256:
if keycode == 0:
@@
-315,6
+320,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 = 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)
cb2 = wx.CheckBox(self, -1, "KEY_UP")
self.Bind(wx.EVT_CHECKBOX, self.OnKeyUpCB, cb2)