Skip to content

Commit

Permalink
[Mac Keyboard Accelerators] Disable Cmd = for M99
Browse files Browse the repository at this point in the history
https://chromium-review.googlesource.com/c/chromium/src/+/3388332 adds
Cmd = as a hidden keyboard shortcut for Zoom In but does so in a way
that's not correct for non-US style keyboards. Disable Cmd = on
M99, in favor of a follow-up CL that will land in the near future.

This cl will need to be cherry-picked back to M99.

Bug: 1286243

Test: out/Release/unit_tests --gtest_filter=GlobalKeyboardShortcuts*
Change-Id: I343296c3ebdf9907250e4ad1d59938549e79a67c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3413662
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Jayson Adams <shrike@chromium.org>
Cr-Commit-Position: refs/heads/main@{#963606}
  • Loading branch information
shrike69 authored and Chromium LUCI CQ committed Jan 26, 2022
1 parent ac003a1 commit 7fbbdbe
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
1 change: 0 additions & 1 deletion chrome/browser/global_keyboard_shortcuts_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ CommandForKeyEventResult ShortcutCommand(int cmd) {
{true, false, true, false, kVK_ANSI_F, IDC_FULLSCREEN},

// Special shortcuts for Zoom in and out.
{true, false, false, false, kVK_ANSI_Equal, IDC_ZOOM_PLUS},
{true, false, false, false, kVK_ANSI_KeypadPlus, IDC_ZOOM_PLUS},
{true, false, false, false, kVK_ANSI_KeypadMinus, IDC_ZOOM_MINUS},
});
Expand Down
3 changes: 0 additions & 3 deletions chrome/browser/global_keyboard_shortcuts_mac_unittest.mm
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,4 @@ int CommandForKeys(int vkey_code,
const int cmdMinusFromKeypad =
CommandForKeys(kVK_ANSI_KeypadMinus, CommandKeyState::kDown);
EXPECT_EQ(cmdMinusFromKeypad, zoomOut);

const int cmdEquals = CommandForKeys(kVK_ANSI_Equal, CommandKeyState::kDown);
EXPECT_EQ(cmdEquals, zoomIn);
}

0 comments on commit 7fbbdbe

Please sign in to comment.