Markdown OKF-Schema Studio

Behaviour SwRS-MDOKFSTUDIO-PALETTE-083

Cmd or Ctrl with B, I or K runs Bold, Italic or Link on the platform's command key

When the writer presses Cmd+B, Cmd+I or Cmd+K on macOS, or Ctrl+B, Ctrl+I or Ctrl+K elsewhere, in the block text box, the extension SHALL run Bold, Italic or the Link panel, matching the typed letter before the physical key, matching no other key press, and naming the shortcut in the tooltip of each palette button.

Part of StRS-MDOKFSTUDIO-PALETTE-019, outside the paths drawn on its map.

Scenarios 6

The situations the tests check; open one to read it.

nominalPlatform key
Givena block editor with a selected word on Windows
Whenthe writer presses Ctrl+B
Thenthe word is wrapped in ** and the key does not reach VS Code
nominalTyped letter first
InputOutcome
A Dvorak layout where the physical K key types t, and the writer presses Ctrl+KNo shortcut matches and the key stays with the browser
A layout where the physical K key types a Cyrillic letter, and the writer presses Ctrl+KThe Link shortcut matches through the physical key
nominalTooltip and accessible name
Givena palette on Windows
Whenthe writer hovers Bold
Thenthe tooltip reads Bold (Ctrl+B) and the accessible name is Bold; on macOS the tooltip uses Cmd
refusalWrong command key
Givena block editor on macOS
Whenthe writer presses Ctrl+K
Thenthe Link panel does not open
refusalKeys that never match
InputOutcome
A layout where AltGr types a character, reported as Ctrl and Alt together, and the writer presses AltGr and BNo shortcut matches
An IME composition in progress and the writer presses Ctrl+BNo shortcut matches
A plain key, a key with Alt or AltGraph, a key with neither Cmd nor Ctrl, or B, I or K with ShiftNo shortcut matches
boundaryButton without a shortcut
Giventhe palette
Whenthe writer hovers Strikethrough
Thenthe tooltip reads Strikethrough without parentheses

Implemented in 1

Tested by 2