mirror of
https://github.com/hexahigh/games.git
synced 2025-12-11 20:15:38 +01:00
update calc secret
This commit is contained in:
parent
0a0276b2c2
commit
717f06535c
@ -27,3 +27,22 @@ async function checkSecret() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//adding event handler on the document to handle keyboard inputs
|
||||||
|
document.addEventListener("keydown", keyboardInputHandler);
|
||||||
|
|
||||||
|
//function to handle keyboard inputs
|
||||||
|
function keyboardInputHandler(o) {
|
||||||
|
// to fix the default behavior of browser,
|
||||||
|
// enter and backspace were causing undesired behavior when some key was already in focus.
|
||||||
|
o.preventDefault();
|
||||||
|
//grabbing the liveScreen
|
||||||
|
|
||||||
|
//numbers
|
||||||
|
if (o.key === "6") {
|
||||||
|
sixPress()
|
||||||
|
} else if (o.key === "9") {
|
||||||
|
checkSecret()
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user