[w3c/uievents] keydown event should have an attribute which is set to true when it's followed by a beforeinput or keypress event? (#179)

Although I suggested same or similar thing already. However, I meet this issue again because I'm working on preparing to stop dispatching keypress events for non-printable keys on Gecko.

When I need to handle both non-printable keys and printable keys and I shouldn't kill following keypress event for compatibility, I need to handle keydown event only when it won't be followed by keypress event but otherwise, keydown event is the last chance to handle it.

This is not necessary for web apps, probably. However, when implementing default action (including implemented by extensions), this is really important. In this purpose, I need to distinguish if the key or key combination is printable (i.e., followed by keypress events).

So, I want KeyboardEvent.isPrintable, KeyboardEvent.isInputtingText or something as boolean attribute. How do you thing, @garykac?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/uievents/issues/179

Received on Saturday, 3 February 2018 02:01:26 UTC