MCPcopy Create free account
hub / github.com/pyfa-org/Pyfa / onChar

Method onChar

gui/builtinContextMenus/itemProjectionRange.py:119–128  ·  view source on GitHub ↗
(event)

Source from the content-addressed store, hash-verified

117 # checks to make sure it's valid number
118 @staticmethod
119 def onChar(event):
120 key = event.GetKeyCode()
121
122 acceptable_characters = '1234567890.'
123 acceptable_keycode = [3, 22, 13, 8, 127] # modifiers like delete, copy, paste
124 if key in acceptable_keycode or key >= 255 or (key < 255 and chr(key) in acceptable_characters):
125 event.Skip()
126 return
127 else:
128 return False

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected