char
is deprecatedcharCode
is deprecatedkey
fires for both printable characters and control keyskeyCode
is deprecatedwhich
is deprecatedkeypress
is deprecatedinput
does not fire for elements that are notinput
,textarea
,select
orcontenteditable
- most annoyinglytabindex
is not enough
Is the recommended way going forwards to keep the list of predefined key
values as a blacklist and assume what's not on there is a printable character? How's that going to work out for keyboards with special/programmable keys?
When trying to capture printable characters on non-input|textarea|select|contenteditable
, is as of current the only non-hacky (no incomplete ranges or blacklists as seen in many similar questions) way without using deprecated features to use a hidden input
/textarea
and use its value for capturing characters that actually change that value?