How to cancel events such as keyPress, keyDown, ... from one key and activate them in another

0

I played a flash game in the browser a long time ago, and recently I got a notebook with a very different keyboard from the previous one and I was wondering if I could have a Javascript script that I would run on the console that would 'change' the keys. For example, when I press the keys WSAD it would be as if I had pressed the arrow keys.

Just to illustrate ...

trocar(A, B) {

cancelarEventoDe(A);

ativarEventoDe(B);

}
    
asked by anonymous 10.03.2018 / 02:03

0 answers