The keyboard key code constants are also old in GWT, but that one was 
obvious, as GWT has key codes as integers, while Elemental2 has key codes 
as strings.


JS KeyboardEvent has 

- key (number, the physical key on the keyboard)
- code (string, the final character on the keyboard after evaluating 
locale, keyboard layout and SHIFT / ALT / CTRL)
- keyCode (number, deprecated, the number does not represent the final 
character)
- charCode (number, deprecated, only available during keyPress event)

GWT uses keyCode for legacy reasons. You should always use code/key. But 
even if you use code/key you still have to take care if your application is 
international. A classic one is ALT + "/" as a keyboard shortcut which I 
cannot trigger at all for example.


-- J.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/google-web-toolkit/ca2b1c1e-6585-4bef-8ab0-dac690895dc1n%40googlegroups.com.

Reply via email to