Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(desktop): Ctrl+Plus zooms in on Spanish and German keyboard layouts #17069

ClosedPrgm-code(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/17069/headopened View on GitHub

Showing 2 changed files with 50 additions and 1 deletion.

x
0 of 2 viewed, 2 left
39 additions and 0 deletionsapps/web/src/keybindings.test.tsModified
View file
@@ -1129,6 +1129,45 @@
+ it("leaves mod plus a zoom character to zoom on layouts that type it elsewhere", () => {
+ // Spanish and German layouts type "+" on the key US layouts label "]".
+ const layoutPlus = event({ key: "+", code: "BracketRight", ctrlKey: true });
+ assert.isNull(
+ resolveShortcutCommand(layoutPlus, DEFAULT_RESOLVED_KEYBINDINGS, { platform: "Linux" }),
+ );
+ assert.strictEqual(
+ resolveShortcutCommand(layoutPlus, DEFAULT_RESOLVED_KEYBINDINGS, {
+ platform: "Linux",
+ context: { previewFocus: true },
+ }),
+ "preview.zoomIn",
+ );
+ // Shift on that key types "*", which still falls back to the physical "]".
+ assert.strictEqual(
+ resolveShortcutCommand(
+ event({ key: "*", code: "BracketRight", ctrlKey: true, shiftKey: true }),
+ DEFAULT_RESOLVED_KEYBINDINGS,
+ { platform: "Linux" },
+ ),
+ "thread.next",
+ );
+ });
+​
+ it("keeps the physical key for shifted zoom characters", () => {
+ const keybindings = compile([