Fixes { and [ in Windows, grid editor
@@ -528,10 +528,7 @@ class KeywordEditor(with_metaclass(classmaker(), GridEditor, RideEventHandler)):
def OnKeyDown(self, event):
keycode = event.GetUnicodeKey()
specialkcode = event.GetKeyCode()
- if platform.lower().startswith('linux'):
- event.Skip() # DEBUG Only with this gets to OnChar when in Linux
- # print(f"DEBUG: KeyCODE chr{chr(keycode)} value{keycode} uchr{chr(specialkcode)} uvalu"
- # f"e{specialkcode}")
+ event.Skip()
if event.ControlDown():
if event.ShiftDown():
if keycode == ord('I'):
@@ -585,9 +582,9 @@ class KeywordEditor(with_metaclass(classmaker(), GridEditor, RideEventHandler)):
event.Skip()
def OnChar(self, event):
- # keychar = event.GetKeyCode()
keychar = event.GetUnicodeKey()
- #print(f"DEBUG: OmChar at kweditor {keychar} {chr(keychar)}")
+ if keychar == 0:
+ return
if keychar in [ord('['), ord('{'), ord('('), ord("'"), ord('\"'), ord('`')]:
self._open_cell_editor().execute_enclose_text(chr(keychar))
else:
