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
Implement keyboard actions to avoid beeps on certain key bindings #2617
Comments
Awesome, I'll see if we can implement those methods in Electron, and if it doesn't work we can always patch libchromiumcontent. |
1. Avoid capturing key event to menu. electron/electron#170 2. Enable accepting first mouse event. electron/electron#212 3. Enable using transparent window. electron/electron#949 4. Enable turning off auto hide cursor. electron/electron#995 5. Disable beeps when pressing certain keys. electron/electron#2617
Hmm I have overridden those methods in Chromium and I'm sure they are on the right place since other methods like I also tested whether I looked into the key handling code of Chromium and tried to comment out different parts of code, however the beep is always there, I'm out of ideas now. |
That is frustrating. Thanks for trying. I wonder if we could dtrace into the API doing the beeping and figure out what is causing it. It drives me bonkers that this key binding has such a bad experience. |
Hello, I would like to open dialogue on this issue again please. I'm open to trying to fix it myself with my limited knowledge but has anyone taken this any further by any chance? Thanks for the efforts so far! |
@alexmalik I'm cheering you on from afar! Pretty please, I'd love a fix. The workaround mentioned on the atom issue here: does not work on my 10.12.5. |
@hedefalk That workaround didn't work for me on OSX 10.12.5 either but I did learn that you can disable those sounds globally in system prefs -> sound which is fine by me though I'm sure someone wants it. |
@paralel-github tried it, but didn't help. Tried restarting Atom to make sure. Sound is still there though. |
@karlhorky You're right... when I quit Atom, it doesn't work anymore. But I've figured out why it did work for me and here's the sequence you need to do. Will require to repeat steps each time you restart Atom. This is not the perfect fix but it works as long as you don't quit Atom.
Then it works! |
Heh, yep, like that it works! Good find |
@paralel-github Thanks for that temporary solution. My sanity thanks you! |
For anyone still frustrated by this I've found the fix described here: atom/atom#1669 (comment) does work but requires a restart to take effect. |
Given that this is likely a problem upstream in Chromium, and that this isn't currently on our roadmap, i'm going to go ahead and label this a |
I reported this issue to Chromium on Dec 19, 2018 , and they confirmed it now. To vote up and follow it, Star this issue. |
Here's a work-around, which I've also posted to @hanguokai's Chromium issue (#2617 (comment)): You can establish system-global key bindings for the key combinations ^⌘←, ^⌘↓, and ^⌘→ that are mapped to no operation ("noop"). Simply having these declared as valid keystrokes at the OS level eliminates the system beep that occurs even when a Chromium app accepts and handles the keystroke. In order to establish this, you need to create a ~/Library/KeyBindings/DefaultKeyBinding.dict – note that you'll probably need to create the directory as well, and that the directory name is plural (Bindings), but the file name is singular (Binding). This should be in your user Library folder, not the /Library folder or the /System/Library folder. The file should be a text file with these contents:
Once you have created this file, restart any applications where you want to use these keystrokes (or just reboot your system), and you should find that the system beeps are gone. I have successfully applied this tweak on macOS Catalina (10.15.2) to use the default keyboard shortcuts for the “View: Move Editor into Next Group” and “View: Move Editor into Previous Group” commands without hearing system beeps each time. |
Ahh thank you for the fix. This was driving me crazy :-) |
same the error sounds were so annoying. Thanks for the fix @sentience! |
When
ctrl-cmd-down
,ctrl-cmd-left
, orctrl-cmd-right
are pressed in any Electron (or Chrome)input
ortextarea
, an audible beep occurs. I believe I've tracked this down to the following methods not being implemented in bridged_content_view.mm in theNSResponder Action Messages
section starting at line 351.- (void)makeBaseWritingDirectionNatural:(id)sender
- (void)makeBaseWritingDirectionRightToLeft:(id)sender
- (void)makeBaseWritingDirectionLeftToRight:(id)sender
They do delegate up the responder chain in their implementation of
doCommandBySelector
on line 579. This leaves me unsure if there's any way to implement these methods via the content API or whether we'll need to add a patch. Either way, it would be great to implement them to avoid the beeping sound when moving lines down in Atom.Refs atom/atom atom/atom#1669
/cc @zcbenz
The text was updated successfully, but these errors were encountered: