Open moteus opened 2 years ago
I can definitely do this (so we can add onEditorChar
), but does it do something that onEditorKeyDown
doesn't? onEditorKeyDown
can return false
to "eat" the key as well...
From the doc
While both of these functions can be used with the events of wxEVT_KEY_DOWN, wxEVT_KEY_UP and wxEVT_CHAR types, the values returned by them are different for the first two events and the last one. For the latter, the key returned corresponds to the character that would appear in e.g. a text zone if the user pressed the key in it. As such, its value depends on the current state of the Shift key and, for the letters, on the state of Caps Lock modifier. For example, if A key is pressed without Shift being held down, wxKeyEvent of type wxEVT_CHAR generated for this key press will return (from either GetKeyCode() or GetUnicodeKey() as their meanings coincide for ASCII characters) key code of 97 corresponding the ASCII value of a
So, I use this event to handle braces and quotes. Also, right now i want to add support to my hotkeys module make single chars case sesetive
In fact I already use it in some of my plugins. This different from event key down so it allows to get real symbol (not keyboard key). So I think I can use it in my hotkey plugin to e.g. diffirintiate between upper and lower case This is my plugin