Python wx.WXK_NUMPAD_LEFT Examples
The following are 2
code examples of wx.WXK_NUMPAD_LEFT().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
wx
, or try the search function
.
Example #1
Source File: __init__.py From EventGhost with GNU General Public License v2.0 | 6 votes |
def onFrameCharHook(self, event): keyCode = event.GetKeyCode() if keyCode == wx.WXK_F4: if event.AltDown(): self.destroyMenu() elif keyCode == wx.WXK_RETURN or keyCode == wx.WXK_NUMPAD_ENTER: self.GoTo() elif keyCode == wx.WXK_RIGHT or keyCode == wx.WXK_NUMPAD_RIGHT: self.MoveCursor(1) elif keyCode == wx.WXK_ESCAPE: self.destroyMenu() elif keyCode == wx.WXK_UP or keyCode == wx.WXK_NUMPAD_UP: self.Turn(1) elif keyCode == wx.WXK_DOWN or keyCode == wx.WXK_NUMPAD_DOWN: self.Turn(-1) elif keyCode == wx.WXK_LEFT or keyCode == wx.WXK_NUMPAD_LEFT: self.MoveCursor(-1) else: event.Skip()
Example #2
Source File: __init__.py From EventGhost with GNU General Public License v2.0 | 6 votes |
def onFrameCharHook(self, event): keyCode = event.GetKeyCode() if keyCode == wx.WXK_F4: if event.AltDown(): self.destroyMenu() elif keyCode == wx.WXK_RETURN or keyCode == wx.WXK_NUMPAD_ENTER: self.DefaultAction() elif keyCode == wx.WXK_RIGHT or keyCode == wx.WXK_NUMPAD_RIGHT: self.DefaultAction() elif keyCode == wx.WXK_ESCAPE: self.destroyMenu() elif keyCode == wx.WXK_UP or keyCode == wx.WXK_NUMPAD_UP: self.menuGridCtrl.MoveCursor(-1) elif keyCode == wx.WXK_DOWN or keyCode == wx.WXK_NUMPAD_DOWN: self.menuGridCtrl.MoveCursor(1) elif keyCode == wx.WXK_LEFT or keyCode == wx.WXK_NUMPAD_LEFT: if len(self.oldMenu) > 0: self.menu, ix = self.oldMenu.pop() wx.CallAfter(self.UpdateMenu,ix) else: self.destroyMenu() else: event.Skip()