From 0e1e26c29c73a93f8691174beaf2e8c09d28e65a Mon Sep 17 00:00:00 2001 From: ibuler Date: Wed, 16 Oct 2024 15:06:00 +0800 Subject: [PATCH] perf: disable f1 key --- .../extensions/disable_new_tab_window_menu/content_script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/terminal/applets/chrome/extensions/disable_new_tab_window_menu/content_script.js b/apps/terminal/applets/chrome/extensions/disable_new_tab_window_menu/content_script.js index 3b2ba828c..63f89f0a8 100644 --- a/apps/terminal/applets/chrome/extensions/disable_new_tab_window_menu/content_script.js +++ b/apps/terminal/applets/chrome/extensions/disable_new_tab_window_menu/content_script.js @@ -36,7 +36,7 @@ document.addEventListener("contextmenu", function (event) { const AllowedKeys = ['P', 'F', 'C', 'V'] window.addEventListener("keydown", function (e) { - if (e.key === "F12" || (e.ctrlKey && !AllowedKeys.includes(e.key.toUpperCase()))) { + if (e.key === "F12" || e.key === "F1" || (e.ctrlKey && !AllowedKeys.includes(e.key.toUpperCase()))) { e.preventDefault(); e.stopPropagation(); debug('Press key: ', e.ctrlKey ? 'Ctrl' : '', e.shiftKey ? ' Shift' : '', e.key)