w3c / uievents-key

UI Events KeyboardEvents key Values
https://w3c.github.io/uievents-key/
Other
15 stars 16 forks source link

Request example for DomKey when Ctrl and CapsLock are both down #39

Closed garykac closed 7 years ago

garykac commented 7 years ago

From @choniong on February 29, 2016 19:14

According to https://w3c.github.io/uievents/#keys-guidelines Rule 3 Ctrl+CapsLock+c should ignore CapsLock and produce 'c', but FF is producing 'C'.

Requesting an example to clarify.

Copied from original issue: w3c/uievents#70

garykac commented 7 years ago

From @masayuki-nakano on March 1, 2016 0:57

I think that CapsLock and NumLock should be honored because CapsLock (and ShiftLock in some keyboard layouts) typically doesn't cause making printable keys not input any text and also ignoring NumLock key state doesn't make sense (E.g., Ctrl + NumPad1 should cause '1').

garykac commented 7 years ago

The spec currently says

...the key value should be the printable key value that would have been produced if the key had been typed with the default keyboard layout with no modifier keys except for 'Shift' and 'AltGr' applied.

I think it makes sense to include CapsLock as well.

The problem with NumLock is that Numpad5 doesn't have a key value defined without the NumLock modifier. However, we could define one to avoid that problem.