import { Modal } from '@mantine/core'; import { isMac } from './shell/TopBar'; const mod = () => (isMac() ? '⌘' : 'Ctrl'); const ROWS: [string[], string][] = [ [['MOD', 'K'], 'Search, go to a page, open a test run or ask a question'], [['/'], 'Search (opens the same palette)'], [['N'], 'Start a new test run'], [['['], 'Hide or show the sidebar'], [['G', 'H'], 'Go to Home'], [['G', 'R'], 'Go to Test runs'], [['G', 'S'], 'Go to Scenarios'], [['G', 'D'], 'Go to Defects'], [['G', 'P'], 'Go to Reports'], [['G', 'E'], 'Go to Test environments'], [['Alt', '1 2 3'], 'On a test run: the conversation, the message box, the details panel'], [['MOD', '\\'], 'On a test run: show or hide the details panel'], [['Esc'], 'Close a menu, the palette or a sheet'], [['?'], 'Show this list'], ]; /** The keyboard shortcut list (the ? key). Approving, deciding, signing off and the emergency stop have no single-key shortcut by design. */ export function KeyboardSheet({ opened, onClose }: { opened: boolean; onClose: () => void }) { return (

Single keys work when you are not typing in a field.

{ROWS.map(([keys, what]) => (
{keys.map((k, i) => {k === 'MOD' ? mod() : k})}
{what}
))}

Approving, deciding on failures, signing off and the emergency stop never have a one-key shortcut. They always need a visible button.

); }