From 50daab722491315d7184bb98d3f97fc44268667f Mon Sep 17 00:00:00 2001 From: Martin Tournoij Date: Wed, 10 Dec 2025 12:24:36 +0000 Subject: [PATCH] Add noop command This is useful to "unmap" native browser mappings; for example I sometimes accidentally press or instead of to find the next match, which opens the sidebar which I then need to hide with the mouse. It's pretty annoying. With this, I can do: map noop map noop And it won't do anything. Tested locally in Firefox 145 and Chromium 143.0.7499.40 Fixes #4213 --- background_scripts/all_commands.js | 8 ++++++++ content_scripts/mode_normal.js | 3 +++ 2 files changed, 11 insertions(+) diff --git a/background_scripts/all_commands.js b/background_scripts/all_commands.js index 5abab2a16..96fbceea3 100644 --- a/background_scripts/all_commands.js +++ b/background_scripts/all_commands.js @@ -614,6 +614,14 @@ const allCommands = [ noRepeat: true, topFrame: true, }, + + { + name: "noop", + desc: "No-op (do nothing); useful to override/unmap native browser mappings", + group: "misc", + noRepeat: true, + topFrame: true, + }, ]; export { allCommands }; diff --git a/content_scripts/mode_normal.js b/content_scripts/mode_normal.js index eaa649c3f..7359128e8 100644 --- a/content_scripts/mode_normal.js +++ b/content_scripts/mode_normal.js @@ -163,6 +163,9 @@ const NormalModeCommands = { }); }, + noop() { + }, + copyCurrentUrl() { chrome.runtime.sendMessage({ handler: "getCurrentTabUrl" }, function (url) { HUD.copyToClipboard(url);