Feature #8458
openWKeyEvent don't give access to JavaScriptEvent jsEvent_ on wt4
0%
Description
Hello,
I'm porting a big application from wt3 to wt4, in my old application I was using keyevent to check some accels (like ctrl+numpad, etc), but with the new structure, I cannot access jsEvent_.keyCode (but I can see that the values are there on the debugger).
It's possible to add a getJsEvent() { return jsEvent_; } method to the WKeyEvent class for next releases?
Any workaround for the current release?
Kind regards
Updated by Korneel Dumon over 3 years ago
Hi,
can't you get the necessary info from WKeyEvent::key()
and WKeyEvent::modifiers()
? As far as I can tell, the numpad keys should be mapped to a Wt::Key
value.
Updated by José Luis Rey over 3 years ago
No, it is not possible, the WKeyEvent value is set to (0) when the value is not in the enum (that only includes basic keys).
The correct values are clearly visible on the debugger on the jsEvent_ member but are not accessible. All this info was accessible on wt3 without problems.
Kr
Updated by Korneel Dumon over 3 years ago
Hi,
I lost track of this for a while. Can you be more specific about what is not working? I tested with Ctrl-numpad and I get a value for Wt::Key::Key_*.
I think it would be cleaner to keep it private, but if you have a good example to convince us otherwise, maybe.