Show the input switching shortcut in keyboard hints

This commit is contained in:
David Heinemeier Hansson committed 2026-10-07 18:10:20 +02:00
1 parent f273eed840
commit ee358c251b
4 files changed
+7 -2

No files matched your search

+3
View File
@@ -64,6 +64,9 @@ rendered=$(keybindings)
grep -q 'SUPER + F *→ Full screen' <<<"$rendered" ||
fail "a chord with no alternative renders on its own" "$rendered"
pass "the keybindings menu renders its entries"
grep -q 'CTRL SHIFT + SPACE *→ Switch input language' <<<"$rendered" ||
fail "the input switch shortcut appears in the cheatsheet" "$rendered"
pass "the input switch shortcut appears in the cheatsheet"
(( $(grep -c '→ Close window$' <<<"$rendered") == 1 )) ||
fail "an alternative chord joins the row of the first one" "$rendered"
+1
View File
@@ -15,6 +15,7 @@ assertEqual(model.inputLabel({}, 'EN'), 'EN', 'a stopped input service retains t
assertEqual(model.inputLabel({ current: 'hangul' }, 'EN'), '한', 'Korean input has a distinct label')
assertEqual(model.inputLabel({ current: 'custom', language: 'vi' }, 'EN'), 'VI', 'other engines use their reported language')
assertEqual(model.inputTooltip(japanese, 'English (US)', false).includes('Space twice'), true, 'Japanese explains character choices')
assertEqual(model.inputTooltip(japanese, 'English (US)', false).includes('Ctrl + Shift + Space'), true, 'the input toggle shortcut is discoverable')
assertEqual(model.inputTooltip(japanese, 'English (US)', true).includes('Right-click'), true, 'combined input and layout switching stays discoverable')
assertEqual(model.inputTooltip({ methods: ['keyboard-fr'] }, 'French', false), 'French\nClick to set up an input language', 'one foreign mode offers input setup')
assertEqual(model.showIndicator('EN', false, false), false, 'English alone stays hidden')