Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

fix(keyboard): Cmd+K command palette works from editable fields

rcourtmancc1ebb569f40
diff --git a/frontend-modern/src/hooks/useKeyboardShortcuts.ts b/frontend-modern/src/hooks/useKeyboardShortcuts.ts
index 6a90098157..757cf801f2 100644
--- a/frontend-modern/src/hooks/useKeyboardShortcuts.ts
+++ b/frontend-modern/src/hooks/useKeyboardShortcuts.ts
@@ -129,11 +129,17 @@ export function useKeyboardShortcuts(options: KeyboardShortcutsOptions = {}) {
return;
}
- if (isEditableTarget(e.target)) {
+ const key = e.key.toLowerCase();
+
+ if ((e.metaKey || e.ctrlKey) && key === 'k') {
+ e.preventDefault();
+ openCommandPalette();
return;
}
- const key = e.key.toLowerCase();
+ if (isEditableTarget(e.target)) {
+ return;
+ }
if (key === 'g' && !awaitingSecondKey() && !e.metaKey && !e.ctrlKey && !e.altKey) {
if (!e.repeat) {