GeezerVison is showing github.com — Mac OS X "Invalid key shortcut sound" on ⌃⌘↓ · Issue #44070 · microsoft/vscode
Mac OS X "Invalid key shortcut sound" on ⌃⌘↓ #44070Description
- VSCode Version: 1.20.1
- OS Version: 10.11.6
Steps to Reproduce:
- Press
⌃⌘↓ in the text editor. The "invalid key shortcut" sound will be played. (This is also the case for ⌃⌘← and ⌃⌘→.
- Press
⌃⌘↑. The "invalid key shortcut" sound will not be played.
There's clearly something going funny here, because up and down have different behaviour. These sounds play even if they are valid key shortcuts. Reacted by Hiroaki KARASAWA, Larry Gritz, Yoni Amir and Keshav Carpenter ActivityRMacfarlane commented on Feb 21, 2018 Tyriar commented on Feb 23, 2018 Yeah this also affects move to next/previous terminal pane keys I found recently. Tyriar commented on Oct 9, 2019 Reacted by YoungTaek and Joe Seifi cbarrick commented on Mar 15, 2021 FYI for anyone else stumbling into this.
The workaround given in the upstream Chromium issue is to setup key bindings at the OS-level that are just noops.
$ mkdir -p ~/Library/KeyBindings
$ cat > ~/Library/KeyBindings/DefaultKeyBinding.dict <<EOF
{
"^@\UF701" = "noop";
"^@\UF702" = "noop";
"^@\UF703" = "noop";
}
EOF
Then restart the affected apps. Reacted by Larry Gritz, Yoni Amir, Donald, Byonghun Lee, Rocky and murs313 Reacted by Mikael Carpenter and murs313 Reacted by 0xsarawut.base.eth Tyriar commented on Mar 16, 2021 211217613 commented on Apr 12, 2023 so is this an issue with whatever upstream codebase vscode depends on? I get this annoying beeping sound every time I move a line down via a keyboard shortcut. cbarrick commented on Apr 14, 2023
so is this an issue with whatever upstream codebase vscode depends on?
Yes. This is an issue in Chromium and thus Electron. The upstream bugs in both Chromium and Electron have been closed as "won't fix."
incanus commented on Mar 8, 2024 Is this workaround no longer working for anyone else on macOS 14.4? Two machines, same effect and same keys as original report (i.e. ⌃⌘↑ is fine). omril1 commented on Mar 14, 2024 I think this bug came back after a few years cbarrick commented on Mar 16, 2024 Here is the new workaround from the upstream Electron bug:
{
"@^\UF700" = "noop:";
"@^\UF701" = "noop:";
"@^\UF702" = "noop:";
"@^\UF703" = "noop:";
"@~^\UF700" = "noop:";
"@~^\UF701" = "noop:";
"@~^\UF702" = "noop:";
"@~^\UF703" = "noop:";
}
Basically, you needed to add the : at the end of noop, and the order of the modifier symbols is different.
I've included the codes for cmd-ctrl-arrow and cmd-opt-ctrl-arrow above.
The codes for the up arrow (700) are probably not needed.
Details for what these codes mean are at: https://gist.github.com/trusktr/1e5e516df4e8032cbc3d
I'm AFK, so I haven't tested this yet. Reacted by Justin Miller, tpilewicz, Mark Oh, michaelfy, Musterknabe and Kaijian Gao incanus commented on Mar 19, 2024 This is working great for me on two 14.4 Macs. ewjoachim commented on Mar 4, 2025 I keep coming back to this issue, so that's just a condensed version of the latest instructions like above meant to be found easily.
mkdir -p ~/Library/KeyBindings/
<<EOF > ~/Library/KeyBindings/DefaultKeyBinding.dict
{
"@^\UF700" = "noop:";
"@^\UF701" = "noop:";
"@^\UF702" = "noop:";
"@^\UF703" = "noop:";
"@~^\UF700" = "noop:";
"@~^\UF701" = "noop:";
"@~^\UF702" = "noop:";
"@~^\UF703" = "noop:";
}
EOFReacted by Omri Luzon, Kaijian Gao and Ulyssa Reacted by Omri Luzon Tyriar commented on Mar 4, 2025
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|