From 8f5680e50fab541b61e75ab778eb3d7285d42618 Mon Sep 17 00:00:00 2001 From: Flummi Date: Mon, 9 May 2022 12:59:33 +0200 Subject: [PATCH] keybinds - prevent triggering when holding shift, alt, ctrl or meta key --- public/s/js/f0ck.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/s/js/f0ck.js b/public/s/js/f0ck.js index c0ab938..5a882f1 100644 --- a/public/s/js/f0ck.js +++ b/public/s/js/f0ck.js @@ -29,6 +29,8 @@ }; document.addEventListener("keydown", e => { if(e.key in keybindings && e.target.tagName !== "INPUT") { + if(e.shiftKey || e.ctrlKey || e.metaKey || e.altKey) + return; e.preventDefault(); keybindings[e.key](); }