From f2e728e2ca739f95f4cee22523c2d23458c16f27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Babi=C4=8D?= Date: Fri, 19 Mar 2021 11:15:39 +0100 Subject: [PATCH] insert keyboard shortcuts --- src/App.svelte | 11 +++++++++++ tailwind.config.js | 4 +--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/App.svelte b/src/App.svelte index 01c984a..ee46329 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -303,6 +303,15 @@ console.log(proportion.toFixed(2) + "% moves are victory") } } + + const handleKeydown = event => { + if (event.key == "u") { + undo() + } + if (event.key == "r") { + restart() + } + }