Hi, please can you write here a simple code/example to capture correctly a character/number/symbol/spacebar typed on keyboard (and/or scancode), localized keyboard layout (QWERTY, AZERTY), OS independent, non UTF-8, because I’m totally lost on how I can access to KeyBaseEvent scancode and keyName properties.
Many thanks in advance.
void onSelectText(const SelectTextEvent& e) override {
if (module) {
?????
}
}
I don’t know how I can use this. API v2 doc really doesn’t help.
I precise mouse events (over the TransparentWidget => touchscreen-like display) such onEnter, onLeave, onHover… are working without any issue (and smart to code). Keypress is a pain.
onHoverKey isn’t user friendly because by pressing “A” (on AZERTY keyboard), it returns Q, and so on for Z, W, A, etc.
Also, I cannot use BACKSPACE key (to rub last entered char) because… it deletes the module, e.consume(this) seems unefficient, I can’t find the way to filter this specific e.key property if equals GLFW_KEY_BACKSPACE (and can’t modify e.key because it’s a read-only property) to prevent module deletion.