Add key mapping for WIP commands
This commit is contained in:
parent
4d41098481
commit
444012e288
1 changed files with 8 additions and 0 deletions
|
@ -117,3 +117,11 @@ socket.on("glitched command", data => {
|
||||||
finish(document.getElementById(`cmd${data.id}`));
|
finish(document.getElementById(`cmd${data.id}`));
|
||||||
waiter();
|
waiter();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
document.addEventListener("keyup", ev => {
|
||||||
|
let keys = [["Digit1", "Numpad1"], ["Digit2", "Numpad2"], ["Digit3", "Numpad3"]];
|
||||||
|
for (let i=0; i<keys.length; i++) {
|
||||||
|
if (keys[i].indexOf(ev.code) >= 0)
|
||||||
|
WIP.children[i].click()
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
Reference in a new issue