What can i use instead of event which is deprecated?

114 Views Asked by At

i need to move the element by the arrows (arrowUp arrowDown and so on)but event key/keyCode is deprecated. So what can i use instead of them?

2

There are 2 best solutions below

1
SiRanWeb On BEST ANSWER

You can use KeyboardEvent.code

0
Khaled Ayed On

I recommend you to see W3C specifications for a detailed explanation