Shortcuts: panel and context scopes, one chord per scope

A shortcut belongs to the application, a panel or a context (editing text, a paint or
camera tool active, a mask selected). The narrowest active scope runs a chord: an active
context, the focused panel, the panel sharing its shortcuts (Timeline and Composition),
the application. A context's shortcuts never run outside it.

- shortcuts.rs: scope table for engine commands and menu entries, scope_rank,
  scope_label; UiCommand can state its scope.
- Conflicts: the same chord in two scopes is an override (both keep working), reported
  with overrides: true; shortcuts.conflicts lists same-scope pairs only.
- Scoped now, keys unchanged: Remember / Apply Interpretation and Delete Without
  Confirmation (Project), Duplicate Render Item (Render Queue).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
pravdomil
2026-10-30 10:57:09 +01:00
co-authored by Claude Opus 5.5
parent 44f95f766c
commit 189f31d6d1
9 changed files with 247 additions and 27 deletions
+9 -2
View File
@@ -203,8 +203,15 @@ commands), and a preset menu.
- **Assigning.** Select a command, then press keys in the shortcut field (or type them), or
click a key on the keyboard with the modifiers toggled. Conflicts with other commands in an
overlapping scope are listed before you assign.
- **Scope.** Menu and engine commands are application-wide; timeline commands work in the
Timeline and viewer commands in the Composition panel.
- **Scope.** A shortcut belongs to the application, to a panel (Project, Timeline, Composition,
Render Queue…) or to a context (editing text, a paint tool or a camera tool active, a mask
selected). One chord can be bound once per scope, and the narrowest active scope runs it: an
active context, then the panel with the keyboard, then the application. The Timeline and the
Composition panel share their shortcuts. A context's shortcuts work only while it is active;
a panel's shortcut that nothing nearer claims still works from the other panels.
- **Conflicts.** Two commands of one scope on one chord are a conflict (`shortcuts.conflicts`
lists them; the default preset has none). The same chord in two scopes is an override: both
keep working, and `shortcuts.set` reports it with `overrides: true`.
Commands: `shortcuts.list {query?, keys?, assigned?}`, `shortcuts.set {command, params?, keys}`,
`shortcuts.reset {command?}`, `shortcuts.preset {op: select|new|duplicate|delete|rename, name?,