aboutsummaryrefslogtreecommitdiff
path: root/modules/ext/ui-commander.js
diff options
context:
space:
mode:
Diffstat (limited to 'modules/ext/ui-commander.js')
-rw-r--r--modules/ext/ui-commander.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/ext/ui-commander.js b/modules/ext/ui-commander.js
index 7f980ea..4ffdc8b 100644
--- a/modules/ext/ui-commander.js
+++ b/modules/ext/ui-commander.js
@@ -172,6 +172,10 @@ body[data-ui-mode="commander"] #ui-root { display: grid; grid-template-columns:
if (ev.key === 'Enter' && filtered[sel]) { pick(filtered[sel]); ev.preventDefault(); }
});
const onKey = (ev) => {
+ const t = ev.target;
+ // Ctrl/Cmd+K belongs to the focused field (kill-line in a terminal input); only intercept
+ // it from the page body, or typing in the composer opens the palette instead.
+ if (t && (t.tagName === 'INPUT' || t.tagName === 'TEXTAREA' || t.isContentEditable)) return;
if ((ev.ctrlKey || ev.metaKey) && String(ev.key).toLowerCase() === 'k') {
ev.preventDefault(); openPalette();
}