Skip to content

epic: keyboard-only operation (tracking) #545

Closed
10 of 11 issues completed
Closed

Description

@DeepDiver1975

Goal

A Lagebuchführer can run the whole incident from the keyboard alone, quickly and under pressure, without reaching for the mouse and without input landing somewhere it can't be seen.

This grew out of the field note in #466 ("bei tab diesen einen auswählen"). An audit of main (74b2837) showed that the Tab note is the tip of a wider gap: no app-wide shortcuts, overlays that neither take nor return focus, inconsistent Enter-submit, grids without row keys, and focus that is invisible on most controls. Earlier context: #262 (UX review, "few KeyBindings"), #282 (Alt mnemonics).

Keyboard contract

Every child issue implements part of this contract. New UI follows it too.

  1. Overlay: focus goes inside once it is shown, Tab cycles inside it, Esc cancels, Enter triggers the primary action (except in multi-line text), and focus goes back to the control that opened it.
    • Exception, destructive confirms (remove, discard, close): initial focus is on Cancel, and Enter activates the focused button. Confirming takes a deliberate step: Tab to the destructive button, or its own key. A reflex Del → Enter must never delete.
  2. Entry form: Enter submits from any single-line field. Afterwards the form is cleared and focus goes to the first field. The initial focus is the first field, unless the view's issue says otherwise and gives a reason.
    • Sticky fields: a form may mark fields that usually repeat between entries (e.g. Kräfte FEUERWEHR). Those keep their value after a submit, with the text selected, so typing replaces it and Tab keeps it. Each view's issue lists its sticky fields, or says it has none.
  3. Suggestion box: one behaviour covers open-on-focus, Enter, Tab and Esc.
    • Enter submits in a single press when no row is highlighted.
    • Tab never takes a match the user can't see. It takes a match only if it is highlighted in the list or shown as selected inline completion in the box. A blind "only match is a prefix" rule is ruled out: "Florian X 1/46" is a prefix of "Florian X 1/46-1", and "Müll" is a prefix of "Müller" (see the risk in feat(input): one keyboard model for suggestion boxes (Tab, Enter, Esc) #466).
  4. Grid or list: Enter/F2 = primary action or edit, Del = remove (always confirmed, see 1), Space = toggle, arrow keys move.
    • No Del on ETB rows. The Einsatztagebuch is a record, not a list; entries are edited with history, never removed.
    • Every keyboard-triggered toggle or remove can be undone: a short "Rückgängig" notice, also on Ctrl+Z. One stray Space must not silently close an Aufgabe.
  5. Global:
    • Module shortcuts are stable per module, bound to the module key, not to the rail position. The rail order comes from the Stammdaten navigation and the incident's checklists (NavigationLayout.Resolve), so "the third module" differs between departments and incidents. Ctrl+Tab / Ctrl+Shift+Tab cycle the rail as shown.
    • No global shortcut takes a text-editing key (Ctrl+A/C/V/X/Z/Y).
    • A shortcut for a new ETB entry and one to jump to the most urgent warning, in a written order (proposal: Rückzug > Druckabfrage > Aufgabe fällig > ILS; decide in feat(shell): global shortcuts and a shortcut overview #544).
    • An F1 overview generated from the shortcut registry. F1 only: Ctrl+? needs Shift+ß on a German keyboard.
    • Key hints are shown inline on the rail and on the primary buttons, not only in tooltips. A keyboard user never hovers.
    • No global shortcut fires while an overlay is open.
  6. Visible focus: a :focus-visible edge on every interactive control, in its own focus token, not SignalColor. Tokens.axaml reserves SignalColor for the emergency accent; a red ring roaming every control would wear out the meaning of red next to a Rückzugsalarm. Use :focus-visible, never plain :focus, because all XAML is shared with Android.
  7. Stable focus: reaching a view by arrowing the rail doesn't steal focus, and neither sync rebuilds nor reconnects move the user.

Children (suggested order)

Done when

  • Every overlay passes the contract test from test(keyboard): shared keyboard helpers and an overlay contract test #537.
  • A scripted keyboard-only walkthrough of an Übung (create incident → Kräfte → Atemschutz with Druckkontrolle → ETB entries → Aufgabe → PDF export) passes as a headless test, without any pointer event.
  • Keystroke budget. For three flows — one ETB entry, one Druckkontrolle from the warning bar, adding one vehicle in Kräfte — the key presses are counted on main before this milestone and after it, and the numbers are in this issue. Reachable is not the same as fast. (table)
  • Übung check. At least two Lagebuchführer run a scripted scenario keyboard-only, observed and timed; what tripped them up is filed as issues.
  • The shortcut overview lists every shortcut, and the README links to it.

Activity

  1. DeepDiver1975 commented on Oct 1, 2026

    @DeepDiver1975
    ContributorAuthor

    UX review of the milestone; the body and the children are updated. What changed:

  2. DeepDiver1975 commented on Oct 6, 2026

    @DeepDiver1975
    ContributorAuthor

    The tests below are in #568.

    Keystroke budget: before and after v0.8

    Measured headless with real key presses, the same flows on 3b4f24d (the parent of #537, before this milestone) and on main after #567. Each flow starts with focus in another module's form, the way the Lagebuchführer's hands are mid-Einsatz. Only keys spent getting there are counted; the typed text is identical in both versions (one press per character, a chord such as Strg+N counts once).

    Flow Before v0.8 After v0.8 Path after
    One ETB entry not possible without the mouse: 1 click on the rail + 5 keys 4 Strg+N (lands in VON) → Tab, Tab → EINTRAG → Enter
    One Druckkontrolle from the warning bar 26 2 F9 → Druck field → Enter
    One vehicle in Kräfte not possible without the mouse: 1 click on the rail + 11 keys 3 Strg+4 → ↓ → Enter

    Why "not possible" before: the module rail was not in the Tab order. Forward Tab cycled the form → the grid → the command bar → back to the grid and never reached a rail tab; Shift+Tab stuck on the first field (VehicleBox, the ETB's HideSystemCheckBox). Switching modules needed the mouse. For a comparable number, the "before" column assumes one click on the rail tab and counts the cheapest keyboard path after it (forward or backward Tab, whichever is shorter).

    KeystrokeBudgetTests now pins the "after" numbers as budgets (4 / 2 / 3), so a change that makes one of these flows dearer fails the build and has to argue for it.

    Other Done when items

    • Walkthrough: KeyboardWalkthroughTests.An_Uebung_runs_from_Home_to_the_PDF_by_keyboard_alone runs Home → NEUER EINSATZ → Lagebuchführer → Kräfte → Atemschutz Trupp → Druckkontrolle via F9 → two ETB entries → Aufgabe → PDF export, with key presses only (no pointer event, no command or view model set). It found one gap, fixed in the same PR: the PDF dialog opened with focus on the first section checkbox, so a reflex Enter unticked the Checkliste instead of exporting. It now opens on EXPORTIEREN.
    • Overlay contract: OverlayContractTests covers every Pending* overlay and the inline panels. The ETB HistoryPanel is not covered on purpose: it is a read-only docked panel that never takes focus, so it is not an overlay in the sense of the contract.
    • Shortcut overview: the F1 overview is generated from ShortcutRegistry and GlobalShortcutTests checks it lists exactly the registered shortcuts; the README's Mit der Tastatur section links to it (feat(shell): global shortcuts and a shortcut overview #567).
    • Übung check: still open. It needs at least two Lagebuchführer running a scripted scenario, so it cannot be done from here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestuxUser interface and usability

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions