From e44e2fe070484e06d384a31ef2699c3a2d5d474e Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Thu, 13 Jun 2024 15:46:03 +0200 Subject: GitHub migration --- intimate/src/keyboard.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 intimate/src/keyboard.js (limited to 'intimate/src/keyboard.js') diff --git a/intimate/src/keyboard.js b/intimate/src/keyboard.js new file mode 100755 index 0000000..26916bb --- /dev/null +++ b/intimate/src/keyboard.js @@ -0,0 +1,11 @@ +window.onkeydown = (e) => { + console.log(e); + if (e.code === "Space") displayPause(); + if (e.code === "Enter") displayPause(); + if (e.code === "NumPadEnter") displayPause(); + + if (e.code === "ArrowLeft") skipImage(); + if (e.code === "ArrowRight") skipImage(); + if (e.code === "ArrowUp") skipImage(); + if (e.code === "ArrowDown") skipImage(); +} -- cgit