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

Method onChar

gui/builtinContextMenus/droneSplitStack.py:90–99  ·  view source on GitHub ↗
(event)

Source from the content-addressed store, hash-verified

88 # checks to make sure it's valid number
89 @staticmethod
90 def onChar(event):
91 key = event.GetKeyCode()
92
93 acceptable_characters = "1234567890"
94 acceptable_keycode = [3, 22, 13, 8, 127] # modifiers like delete, copy, paste
95 if key in acceptable_keycode or key >= 255 or (key < 255 and chr(key) in acceptable_characters):
96 event.Skip()
97 return
98 else:
99 return False

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected