1
0
Fork 0

Add key mapping for WIP commands

This commit is contained in:
Ethanell 2020-03-06 18:29:20 +01:00
parent 4d41098481
commit 444012e288

View file

@ -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()
}
});