Repository navigation
feat(shell): global shortcuts and a shortcut overview - #567
Merged
Merged
Conversation
Ctrl+1 … Ctrl+0 open a module by its key, not its rail position, so a Stammdaten Navigation that reorders the rail does not move them. Ctrl+Tab / Ctrl+Shift+Tab walk the rail as shown, Checklisten included. Ctrl+N opens the ETB with the caret in VON, also from elsewhere in the ETB. F9 goes to the most urgent open warning: Rückzugsalarm, then a due Druckabfrage, a due Aufgabe, the ILS Rückmeldung. For the Rückmeldung it only focuses ERLEDIGT, so confirming it takes a second key. F1, or the new TASTENKÜRZEL button (also in MEHR on a phone), opens an overview built from ShortcutRegistry, the table the key handler dispatches on. Each module's key is shown on its rail tab, and F9 on the one bar it acts on. The handler tunnels on the TopLevel: Ctrl+Tab only reaches the window while tunnelling (#537), and with nothing focused a key never passes the shell. No shortcut runs while an overlay is open. Fixes #544 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
TASTENKÜRZEL was the widest label on the bar, and the loudest by accident: its own TextBlocks picked up the global TextBlock style, so it rendered in Barlow 14 white beside Oswald 13 grey neighbours. It pushed the action cluster 160px left for a reference aid opened rarely. It is now a ? glyph and its key, F1, in the bar's grey. Screen readers and the tooltip say "Tastenkürzel (F1)", and the phone's MEHR list keeps the word. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
Contributor
Author
|
Follow-up (cc62766): the command-bar entry was too loud. Its own TextBlocks picked up the global TextBlock style, so it rendered in Barlow 14 white beside Oswald 13 grey neighbours. It was also the widest label on the bar and pushed the cluster 160px left. It is now a ? glyph and F1 in the bar's grey. Screen readers and the tooltip say "Tastenkürzel (F1)", and the phone's MEHR list keeps the word. Top to bottom: before #544, the first version of this PR, now. |
13 of 14 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Fixes #544, the last child of the v0.8 keyboard epic #545. The app gets global shortcuts and an F1 overview. Every shortcut comes from one registry (
ShortcutRegistry), which the key handler, the rail's key hints and the overview all read.NavModules.Allorder: 1 ETB, 2 Aufgaben, 3 Funktionen, 4 Kräfte, 5 Beteiligte, 6 Atemschutz, 7 CO-Messung, 8 Dateien, 9 Links, 0 Kontakte. A Stammdaten Navigation that reorders the rail does not move them. A hidden module's key does nothing.Decisions the issue left open:
Pending*overlays, the master data editor's confirm, and inline panels. Esc and Enter keep reaching the overlay.Changes
ShortcutRegistry,KeyChord,ShortcutKeyandWarningKindlive in AppLogic and use no Avalonia types.ModuleLabelsnow holds the rail labels, which used to be private to the workspace view model, because the overview needs them too.MainWindowViewModel.TryRunShortcutandIncidentWorkspaceViewModel.TryRunShortcuteach return false when a shortcut does not apply, so the key goes on to the focused control.IncidentWorkspaceViewModel.MostUrgentWarningis the one priority that both F9 and the bar hints read.ShowModulebecameShowNavItemand is the single "user asked for this module" path from fix(focus): focus stays where the user left it (rail, sync rebuilds, reconnect, ETB filter) #542.ModuleFocusRequestednow carriesToStartField, soWorkspaceFocussends Ctrl+N to VON even when focus is already in the ETB.GlobalShortcutsbehaviour onMainView. It hooks a tunnelling KeyDown handler on the TopLevel, for two reasons:ShortcutOverviewViewfollowsAboutViewandb:Overlay. It has anOverlayContractTestsscenario and passes all four clauses.key-hinttext style. On a Meldung the hint takes the chevron's colour, because the muted grey vanishes on the red Rückzugsalarm row.Screenshots
The workspace with every warning bar up. Before:
After. The rail shows each module's key, and the command bar's ? button shows F1. The Rückzugsalarm row shows F9, since F9 acts on that row:
The F1 overview, on desktop and at phone width:
Checklist
make clean cipasses: 0 errors, 0 warnings, every assembly green (Acceptance 522/522, AppLogic 1153/1153), noTest Run Failed.make format-checkis clean.changelog.d/AnonymizedExampleData)Tests
ShortcutRegistryTestscover:WorkspaceShortcutTestscover:MainWindowViewModelTestscover F1 from any view, F1 blocked behind About, and module keys doing nothing without an Einsatz.GlobalShortcutTests(headless, real keys onMainView) cover:🤖 Generated with Claude Code