gui/controls/gridview.py
def StartingKey(self, evt):
        "This will be called to let the editor do something with the first key"
        key = evt.GetKeyCode()
        ch = None
        if key in [wx.WXK_NUMPAD0, wx.WXK_NUMPAD1, wx.WXK_NUMPAD2, wx.WXK_NUMPAD3, wx.WXK_NUMPAD4,
                   wx.WXK_NUMPAD5, wx.WXK_NUMPAD6, wx.WXK_NUMPAD7, wx.WXK_NUMPAD8, wx.WXK_NUMPAD9]:
            ch = ch = chr(ord('0') + key - wx.WXK_NUMPAD0)
        elif key < 256 and key >= 0 and chr(key) in string.printable:
            ch = chr(key)
            if not evt.ShiftDown():
                ch = ch.lower()
        if ch is not None:
            self._tc.SetStringSelection(ch)
        else:
            evt.Skip()
def StartingKey(self, evt):
        "This will be called to let the editor do something with the first key"
        key = evt.GetKeyCode()
        ch = None
        if key in [wx.WXK_NUMPAD0, wx.WXK_NUMPAD1, wx.WXK_NUMPAD2, wx.WXK_NUMPAD3, wx.WXK_NUMPAD4,
                   wx.WXK_NUMPAD5, wx.WXK_NUMPAD6, wx.WXK_NUMPAD7, wx.WXK_NUMPAD8, wx.WXK_NUMPAD9]:
            ch = ch = chr(ord('0') + key - wx.WXK_NUMPAD0)
        elif key < 256 and key >= 0 and chr(key) in string.printable:
            ch = chr(key)
            if not evt.ShiftDown():
                ch = ch.lower()
        if ch is not None:
            self._tc.SetStringSelection(ch)
        else:
            evt.Skip()
def StartingKey ( self , evt ) : key = evt . GetKeyCode ( ) ch = None if key in [ wx . WXK_NUMPAD0 , wx . WXK_NUMPAD1 , wx . WXK_NUMPAD2 , wx . WXK_NUMPAD3 , wx . WXK_NUMPAD4 , wx . WXK_NUMPAD5 , wx . WXK_NUMPAD6 , wx . WXK_NUMPAD7 , wx . WXK_NUMPAD8 , wx . WXK_NUMPAD9 ] : ch = ch = chr ( ord ( '0' ) + key - wx . WXK_NUMPAD0 ) elif key < 256 and key >= 0 and chr ( key ) in string . printable : ch = chr ( key ) if not evt . ShiftDown ( ) : ch = ch . lower ( ) if ch is not None : self . _tc . SetStringSelection ( ch ) else : evt . Skip ( )
This will be called to let the editor do something with the first key
This will be called to let the editor do something with the first key