Apple Intelligence is now available on iPhone, iPad, and Mac!

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Is there a way to stop the Mac from making a bonk sound when you press Control-Command-Any Arrow Key?

In text input fields, pressing Command-Option-Any Arrow (up/down/left/right) produces a ”bonk” sound. It makes it quite annoying working with text editors that utilizes these keyboard shortcuts.

MacBook Pro 15", macOS 10.14

Posted on Apr 14, 2019 2:29 AM

Reply
Question marked as Top-ranking reply

Posted on Apr 16, 2019 12:02 AM

I'll include the, so far, only known workaround here, in case someone misses the link:


  1. In ~/Library/, create a directory KeyBindings
  2. In ~/Library/KeyBindings/ create a file DefaultKeyBindings.dict
  3. In this file place this content:


{
  "@\UF701" = "noop";
  "@\UF702" = "noop";
  "@\UF703" = "noop";
}


Then restart Atom, VS Code, Safari, Chrome, FireFox, LightTable, or whatever app you have the bonk problem in.

  • Bliss.
35 replies
Question marked as Top-ranking reply

Apr 16, 2019 12:02 AM in response to cobpez

I'll include the, so far, only known workaround here, in case someone misses the link:


  1. In ~/Library/, create a directory KeyBindings
  2. In ~/Library/KeyBindings/ create a file DefaultKeyBindings.dict
  3. In this file place this content:


{
  "@\UF701" = "noop";
  "@\UF702" = "noop";
  "@\UF703" = "noop";
}


Then restart Atom, VS Code, Safari, Chrome, FireFox, LightTable, or whatever app you have the bonk problem in.

  • Bliss.

Apr 15, 2019 3:48 AM in response to Luis Sequeira1

So, here is a repro:


  1. Open the online editor https://codesandbox.io/s/vanilla in your browser of choice (mine is Safari)
    1. It will have the file index.js open.
  2. Open another file from the file explorer of the editor, say style.css.
    1. It will open in a second tab in the editor.
  3. With the file active (a blinking cursor in it), press Control-Command-Right.
    1. This is bound to a command that moved the current file pane down.
    2. You will see the file pane move down.
    3. You will also hear a bonk!.
  4. For good measure press Control-Command-Left.
    1. This is bound to a command that should move the pane up again.
    2. You will see the file pane move back up to where you moved it from.
    3. You will also hear a bonk!.
  5. For a bonk! party, keep moving the panes around with these commands.
    1. bonk! 🥁
    2. bonk! 🥁
    3. bonk! 🥁
    4. bonk! 🥁



Apr 14, 2019 6:05 AM in response to cobpez

Here's an indication that it is a MacOS problem. A way to temporarily get around this is to shut down VS Code or Atom or whatever editor you have the bonk problem in, then go to System Preferences and assign the keyboard shortcut to something, then deselect that shortcut, then start your editor again.

Apr 15, 2019 5:15 AM in response to dialabrain

No one has asked for an explanation for the bonk. Only for a way to make it stop. Or even it is that I know how to make it stop, but would like to be able to instruct my users that does not involve creating a file at a certain place with some certain content.


If you do not feel you are in a helpful mode, dialbrain, you always have the option to just don't engage when someone asks for help.

Apr 15, 2019 6:35 PM in response to dialabrain

As a user of a web-based text editor (Atom), this issue has plagued me for ages. I initially thought the issue was with Chromium (which Atom uses) but seeing the issue also occur in CodeSandbox in Safari makes it seem like it’s a deeper, perhaps OS-level problem. 🤔


dialabrain, suggesting that we mute audio or disable sound effects isn’t helpful, as that’s clearly not what cobpez is asking. We are trying to understand why the sound is happening, figure out a real solution, and/or get confirmation this is a bug in the OS.

Apr 15, 2019 8:12 PM in response to dialabrain

Is there something I can do to better help you understand the problem? Or something you can do to better help me understand why you think it’s not a problem?


You keep on rudely suggesting that we contact Brackets, VSCode, and Atom to have them fix the issue, as you don’t think it’s an issue with the OS. That’s understandable, as Chromium is a custom, native app, so there’s almost certainly something Chromium could do to fix (or workaround) the issue.


However, the issue also occurs in CodeSandbox in Safari. Is there something you think CodeSandbox could do in JavaScript to fix the issue? If so, what?


If not, are you saying Safari itself has a bug in it? If not, that seems to indicate that the issue might be in the OS.

Apr 15, 2019 8:34 PM in response to Chromatican

The javascript would have to capture the modifier key combination and let the browser know it can handle it. It appears it is registering the sequence, but not telling the browser. The browser can't do anything with it so it punts to the OS. The OS has no registered shortcut so it plays the error tone.


I have no idea whether the javascript framework can process such a thing, but that's what I see happening based on your description. It appears the text window isn't consuming the modifier key sequence passed to it. It appears to be responding correctly to the command, but it isn't telling the browser that it can handle the sequence.

Apr 15, 2019 9:43 PM in response to Barney-15E

Thanks! Logically that makes sense, but I’ve looked through the source code for Atom and as far as I can tell it does properly intercept the event and tell the browser not to handle it. Here’s a link on the off-chance someone else wants to peruse it (it’s written in CoffeeScript).


https://github.com/atom/atom-keymap/blob/22252d7ca52713cf9c3b93c99f97a7136e505b0f/src/keymap-manager.coffee


Also, while I could certainly imagine one of the editors failing to properly handle keyboard events, it does seem a bit unlikely that after several years of existence, four widely-used editors would all have the exact same problem…

Apr 16, 2019 9:43 AM in response to Chromatican

I think that registering those shortcuts in System Preferences only works temporarily. But, yes, it is the same basic mechanism. The system bonks on shortcuts that it thinks does not have a binding, even if they are bound by whatever mechanism that javascript binds them. Giving them a default system binding to nothing at all stops the bonking while allowing apps to rebind them.

Apr 23, 2019 8:38 AM in response to cobpez

My bug report was just closed as a dupe.


Unfortunately the way the system is designed I can’t actually see the title or description of the duplicate, or see the discussion that’s been had, but the fact that the “original” report is open seems to indicate that this is actually an issue with the OS. Presumably they would have closed it if they didn’t think it was an actual issue.

Is there a way to stop the Mac from making a bonk sound when you press Control-Command-Any Arrow Key?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.