mirror of
https://github.com/MaciejkaG/statki.git
synced 2024-11-30 11:32:55 +01:00
13 lines
282 B
JavaScript
13 lines
282 B
JavaScript
|
document.addEventListener("keydown", (e) => {
|
||
|
switch (e.code) {
|
||
|
case "KeyB":
|
||
|
switchBoards();
|
||
|
break;
|
||
|
case "KeyS":
|
||
|
switchShips();
|
||
|
break;
|
||
|
case "KeyR":
|
||
|
switchRotation();
|
||
|
break;
|
||
|
}
|
||
|
});
|