Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac OS X "Invalid key shortcut sound" on ⌃⌘↓ #44070

Closed
varkor opened this issue Feb 20, 2018 · 11 comments
Closed

Mac OS X "Invalid key shortcut sound" on ⌃⌘↓ #44070

varkor opened this issue Feb 20, 2018 · 11 comments
Assignees
Labels
electron Issues and items related to Electron *out-of-scope Posted issue is not in scope of VS Code upstream Issue identified as 'upstream' component related (exists outside of VS Code)

Comments

@varkor
Copy link

varkor commented Feb 20, 2018

  • VSCode Version: 1.20.1
  • OS Version: 10.11.6

Steps to Reproduce:

  1. Press ⌃⌘↓ in the text editor. The "invalid key shortcut" sound will be played. (This is also the case for ⌃⌘← and ⌃⌘→.
  2. 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.

@RMacfarlane
Copy link
Contributor

Blocked on electron/electron#2617

@RMacfarlane RMacfarlane added the electron Issues and items related to Electron label Feb 21, 2018
@RMacfarlane RMacfarlane modified the milestone: Backlog Feb 21, 2018
@Tyriar
Copy link
Member

Tyriar commented Feb 23, 2018

Yeah this also affects move to next/previous terminal pane keys I found recently.

@Tyriar Tyriar added bug Issue identified by VS Code Team member as probable bug upstream Issue identified as 'upstream' component related (exists outside of VS Code) and removed editor editor-core Editor basic functionality labels Jun 21, 2018
@Tyriar Tyriar removed the bug Issue identified by VS Code Team member as probable bug label Sep 12, 2018
@Tyriar
Copy link
Member

Tyriar commented Oct 9, 2019

Both Electron and Chromium issues were closed as won't fix 😢 https://bugs.chromium.org/p/chromium/issues/detail?id=916460

@Tyriar Tyriar closed this as completed Oct 9, 2019
@Tyriar Tyriar added the *out-of-scope Posted issue is not in scope of VS Code label Oct 9, 2019
@cbarrick
Copy link

cbarrick commented 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.

@Tyriar
Copy link
Member

Tyriar commented Mar 16, 2021

Updated FAQ in terminal to include the workaround, thanks! microsoft/vscode-docs#4395

@211217613
Copy link

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
Copy link

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
Copy link

incanus commented 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
Copy link

omril1 commented Mar 14, 2024

I think this bug came back after a few years

@cbarrick
Copy link

cbarrick commented 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.

@incanus
Copy link

incanus commented Mar 19, 2024

This is working great for me on two 14.4 Macs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
electron Issues and items related to Electron *out-of-scope Posted issue is not in scope of VS Code upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

No branches or pull requests

7 participants