From cafd480642857755eff64c2c68589f8cb44bc716 Mon Sep 17 00:00:00 2001 From: Jefferey Neuffer <35882868+j7126@users.noreply.github.com> Date: Tue, 3 May 2022 01:49:27 +1000 Subject: [PATCH] :bug: Don't block unused keys when keyboard control is active (#4483) Allows to still use keys such as F5 for refresh, etc. while keyboard control is open, rather than swallowing every possible key combination. --- src/octoprint/static/js/app/viewmodels/control.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/octoprint/static/js/app/viewmodels/control.js b/src/octoprint/static/js/app/viewmodels/control.js index 38431100e..e7a590cb8 100644 --- a/src/octoprint/static/js/app/viewmodels/control.js +++ b/src/octoprint/static/js/app/viewmodels/control.js @@ -728,9 +728,12 @@ $(function () { // z home button = $("#control-zhome"); break; - default: + case 9: // prevent tab key from removing focus from webcam event.preventDefault(); return false; + default: + // don't prevent other keys + return true; } if (button === undefined) {