mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 12:54:20 +01:00
feat(shortcuts): rework shortcut bindings, focus restore, and input guards
Resolve effective bindings from stored prefs plus defaults with leader/direct collision handling and default leader Ctrl+X; let direct actions pass through in terminals and suppress abort while an overlay is open. Add half-page scroll disengage, verified overlay focus restore, and consolidate prompt reset.
This commit is contained in:
1 parent
7e8443f54f
commit
994a8b82e8
33 files changed
+784
-195
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import { isRecord } from '@opencode-manager/shared/utils'
|
||||
import type { KeyboardShortcutAction } from '@/api/types/settings'
|
||||
import { parseJsonc } from '@/lib/jsonc'
|
||||
import { normalizeShortcut } from '@/lib/keyboardShortcuts'
|
||||
@@ -104,10 +105,6 @@ const KEY_LABELS = new Map<string, string>([
|
||||
['insert', 'Insert'],
|
||||
])
|
||||
|
||||
function isRecord(value: unknown): value is Record<string, unknown> {
|
||||
return typeof value === 'object' && value !== null && !Array.isArray(value)
|
||||
}
|
||||
|
||||
function isKeyStroke(value: unknown): value is KeyStroke {
|
||||
return isRecord(value) && typeof value.name === 'string'
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user