Skip to content

Keyboard equivalents

How every map action can be done without a mouse.

The model, its sequence diagram and its reference implementation are written in Phase 3. Version 0 gathers the requirements it must satisfy.

Requirements cited

SRD Requirement
NFR-13 The interface is operable by keyboard; every map action (dragging a track, drawing an annotation, measuring) has a keyboard or form-based equivalent; themes, including high contrast, are honoured.

Model

Written so far for annotations and for moving, rotating, shearing and stretching tracks; the rest of the map follows in Phase 3.

Map action Without a pointer
Draw a line, area, circle, ellipse, label or marker Tab to the map's Draw an annotation toolbar, Enter on a kind; the arrow keys pan the map under the cross in its middle, Space places a point there, Enter finishes, Backspace removes the last, Escape cancels. Or Add annotation… and type the positions (annotations, items 1 to 6).
Drag a corner, centre, radius, axis or label Tab to its handle; the arrow keys move it 5 pixels (25 with Shift); the run of presses is one step when they stop, on Enter, or when the keyboard moves on (presses made while it is saved follow as the next step); Escape puts it back. Or type the change on its properties form.
Add a corner between two Arrow keys on the handle between them.
Remove a corner Delete or Backspace on its handle.
Drag a track, or its fixes in the time window Tab to the selected track's move handle; the arrow keys move it 5 pixels (25 with Shift), and the run of presses is one step, as for an annotation's handle. Whole track and Time window are buttons on the map. Or Move track… and type the distance and bearing (track operations, item 11).
Rotate a track Tab to its rotate handle; Right and Up turn it 1° clockwise, Left and Down anticlockwise, 10° with Shift; one step for the run. The pivot handle moves with the arrow keys. Or Rotate track…, with the pivot and angle typed.
Shear or stretch a track Tab to a diamond beside the first or last fix. Shearing, the arrow keys move it 5 pixels (25 with Shift), the other end held; stretching (Stretch on the map), Up and Right make it 0.1 kn faster, Down and Left slower, 1 kn with Shift. One step for the run. Or Shear track… (course and speed made good) and Stretch track… (speed) (track operations).
Split or merge tracks Split track at current time… and Merge selected tracks on the outline's context menu (Split… and Merge under Track, below the outline, in the playground); there is no map gesture for either.
Right-click a fix (or press and hold it on a touch screen) to colour, label or comment on it Fixes: colour, label or comment… on the outline's context menu: the fix list, a list to type in (a time finds a fix), then the action. In the playground, Fixes… under Track: Up and Down move along the list, Enter or Space chooses (track operations, item 3).
Move a single fix Zoomed in far enough that its fixes have rings, Tab to a fix's ring; the arrow keys move it 5 pixels (25 with Shift), one step for the run. Or Move a fix… and type the position (track operations, items 5 and 6).
Set how often tracks are labelled, marked with a symbol and given a direction arrow; a fix always showing its label or symbol Select the tracks in the outline (Space, Ctrl+Space to add), then Frequencies: labels, symbols and arrows… on the outline's menu or the Command Palette: three lists, one after the other, an interval typed in any (Frequencies… under Track in the playground: a form of three choosers, Tab between them). A fix's own: Fixes: colour, label or comment…, then Always show its time label or Always show its symbol (Time label and Symbol in the playground's fix list) (labels, symbols and arrows). There is no map gesture.
Plot a track over the ground or by dead reckoning Choosing as it is imported, from a list; afterwards Plot over the ground or by dead reckoning… on the outline's menu (OTG/DR… in the playground); there is no map gesture.
Check jumps on the map, or a smoothing preview Find and remove jumps… lists each jump, ticked, in a list read by screen readers; Smooth track… says how many fixes would move and the most any would, in words, before Apply (track operations, items 1 and 2).
Choose the Tote's tracks Primary and Add in the Tote are lists; Delete on a secondary removes it. A track's menu in the outline (Shift+F10 or the menu key; press and hold on a touch screen) has Set as Tote primary, Add to Tote and Remove from Tote (Tote). There is no map gesture.
Choose a narrative entry, a note or a period to move current time to it; read along while playing The Timeline is a list: Up, Down, Page Up, Page Down, Home and End move through it, Enter or Space moves current time to the entry, F2 changes a narrative entry, Delete deletes it, N adds one, / searches; Ctrl+Z undoes the plot's last step from the Timeline except in its text boxes (the search box and the form), where it undoes the typing (Timeline and narrative). The entry on the map beside its track needs no gesture.
Choose which catalogue item supplies a period of a track; take new data; confirm or refuse a platform Coverage: Tab to a period's list, pick with ↑ ↓ (no step yet) and press Enter or Set, the keyboard's way for clicking a source's bar; Take, Not now, Same platform, Not this platform, Unlink and Reviewed are buttons. In VS Code's Catalogues, an item's or a track's menu (Shift+F10 or the menu key) has the same. There is no map gesture (Collation).
Export the map as an image; find the plot an image came from; leave an earlier revision shown read-only Export image… (the Command Palette, the map's title bar, the Outline's menu): a list of sizes, two tick boxes (Space), then the save dialog. Find source of image…: a list, then the open dialog or the ID typed and Enter. On the map, Tab to Go to latest and Enter. In the playground, the Export image panel's lists, tick box and buttons, Enter in its ID box. There is no map gesture (Exported images).
Clear the selection Escape on the map; or the outline, a native tree.
Pan, zoom Arrow keys, and + and -, with the map focused.

Reference implementation

vscode/webview/mapedit.ts (keys while drawing and on handles) and vscode/webview/drawing.ts; vscode/webview/trackmap.ts and vscode/webview/trackedit.ts for a track's handles. The playground tests vscode/test/play/drawing.mjs and vscode/test/play/tracks.mjs place a marker, change an area, move and rotate a track, vscode/test/play/shear.mjs shears and stretches one, and vscode/test/play/fixdrag.mjs moves a single fix, from the keyboard alone; vscode/test/play/tote.mjs chooses the Tote's tracks from the keyboard and by press and hold; vscode/test/play/narrative.mjs reads, chooses, adds, changes and deletes narrative entries from the keyboard.