Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to turn off bell sound in Visual Studio Code?

I've got freshly installed Visual Studio Code on OSX with only Emacs Keymap extension.

When I'm trying to undo (ctrl + /) the bell sound occurs.

Any idea how to turn it off with this keybinding or for ever? I did not find any sound related settings in VSC configs.

like image 394
bartosz Avatar asked Aug 27 '17 12:08

bartosz


2 Answers

For anyone stumbling on this question going crazy for an answer, the issue is related to this: https://github.com/Microsoft/vscode/issues/44070

The bell sound actually occurs when you press Ctrl+/ on any text input box (try it in Chrome address bar and Stickies).

You'll need to rebind the shortcut through DefaultKeyBinding.dict.

Go to ~/Library/KeyBindings/DefaultKeyBinding.dict (you'll need to mkdir and touch the file if it doesn't exist).

Add this:

{
    "^/" = "noop:";
}

Then restart vscode.

like image 123
mooncoder Avatar answered Sep 19 '22 07:09

mooncoder


The best way that I've found is to disable all bell sounds in the operating system's control panel. I'm not sure where that's found for Mac, though.

like image 22
Nick Ramirez Avatar answered Sep 20 '22 07:09

Nick Ramirez