Browse Source

perf: disable f1 key

pull/14311/head
ibuler 1 month ago committed by feng626
parent
commit
0e1e26c29c
  1. 2
      apps/terminal/applets/chrome/extensions/disable_new_tab_window_menu/content_script.js

2
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)

Loading…
Cancel
Save