Francisc
Francisc

Reputation: 80415

What is the proper way of getting the keyCode from a keyboard event

MDN says that both keyCode and which are deprecated.

If both are deprecated, what is the proper way of getting the keycode.

Upvotes: 8

Views: 536

Answers (1)

Marcelo Biffara
Marcelo Biffara

Reputation: 831

you are suposed to use "key" instead of "keyCode". problem is "key" is not yet implemented. so for now keep using "keyCode".

Upvotes: 4

Related Questions