Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): match printable keybindings by key so non-US layouts keep browser zoom #22821

Closedjuliusmarmingewants to merge 3 commits intomain fromfix/issue-14833opened View on GitHub

Showing 8 changed files with 28 additions and 31 deletions (loading 5).

x
0 of 8 viewed, 8 left
2 additions and 0 deletionsapps/web/src/components/files/BrowserDocumentFrame.tsxModified
View file
@@ -181,6 +181,8 @@
!blocked.some(matches) &&
(key.key.length === 1 ||
key.key === "Dead" ||
+ key.key === "Unidentified" ||
+ key.key === "" ||
allowed.some((shortcut) => shortcut.key === normalizeEventKey(key.key)))
25 additions and 12 deletionsapps/web/src/components/settings/KeybindingsSettings.logic.test.tsModified
View file
@@ -91,10 +91,10 @@
});
​
it.each([
- ["@", "Digit2", "mod+shift+2"],
- ['"', "Digit2", "mod+shift+2"],
- ["@", "Quote", "mod+shift+'"],
- ])("captures %s at %s by physical key", (key, code, expected) => {
+ ["@", "Digit2", "mod+shift+@"],
+ ['"', "Digit2", 'mod+shift+"'],
+ ["@", "Quote", "mod+shift+@"],
+ ])("captures %s at %s by layout key", (key, code, expected) => {
expect(
keybindingFromKeyboardEvent(
@@ -110,23 +110,21 @@