Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Can not override or disable the default key 'Alt' #6037

Closed

Description

@mengzyou

I customize Alt-m key binding to toggle menu-bar display/hide.

'body':
'alt-m': 'window:toggle-menu-bar'

But, the defalut key Alt is still available.

This always cause the menu-bar display/hide actions when I use Alt key for others.
So, hope to disable or override the default Alt keymap.


Version: 0.187.0
OS: Linux

Activity

  1. leonardoarroyo commented on Jul 2, 2015

    @leonardoarroyo

    I also need this. I use alt + left/right to switch windows and whenever I get to atom and release alt, the menu bar will pop.

  2. dwelle commented on Jul 2, 2015

    @dwelle
    Contributor

    I second that. I use custom alt-i/j/k/l for caret movement. Didn't notice this until I made the menu bar to auto-hide (although it's not surprising behavior).

  3. joerideg commented on Aug 19, 2015

    @joerideg

    +1

  4. added
    windows
    linux
    on Aug 19, 2015
  5. uptownhr commented on Nov 2, 2015

    @uptownhr

    so any progress here? Can't use emacs bindings because of this.

  6. giyyapan commented on Nov 3, 2015

    @giyyapan

    @uptownhr
    try this:

    # in your init.coffee
    atom.menu.template.forEach (t) ->
      t.label = t.label.replace("&", "")
    atom.menu.update()
    

    got this method from here https://discuss.atom.io/t/alt-key-menu-bar-interaction-overrides-shortuts/9192/7?u=giyyapan
    BTW, I'm using Ubuntu

  7. LoLei commented on Nov 4, 2015

    @LoLei

    @giyyapan Sadly didn't work, alt still opens the menu bar with this.

    On Arch Linux.

  8. giyyapan commented on Nov 4, 2015

    @giyyapan

    @LoLei Well, I've got no other idea then.
    Sorry 😢

  9. uptownhr commented on Nov 4, 2015

    @uptownhr

    @giyyapan that worked for me. I'm on ubuntu 14.04.

  10. LoLei commented on Nov 4, 2015

    @LoLei

    @giyyapan It's okay, thanks for the effort!

  11. pvorona commented on Dec 18, 2015

    @pvorona

    This is also happening to me.
    Windows 10, Windows 7

  12. supreme-gentleman commented on Dec 21, 2015

    @supreme-gentleman

    I hope they could fix this soon...I don't like to have a menu or window decorations, a lot of the hotkeys I use with my OS use the alt key so this is very obnoxious.

  13. supreme-gentleman commented on Dec 21, 2015

    @supreme-gentleman

    This worked for me, I'm using Ubuntu with i3wm and OpenBox
    Add this to your keymap.cson
    'atom-text-editor':
    'alt': ' '

    I hope this works for you guys :) ...this was driving me crazy.

  14. hobofan commented on Dec 21, 2015

    @hobofan

    @angelojulioth Thank you, worked like a charm!

  15. LoLei commented on Dec 28, 2015

    @LoLei

    @angelojulioth Thanks so much, that did the trick.

    To rebind it to another key, you can add something like this in the keymap file:

    '.platform-win32, .platform-linux':
      'ctrl-q': 'window:toggle-menu-bar'
    

    Although that makes the info popup window open everytime...

  16. kankaristo commented on Dec 28, 2015

    @kankaristo

    The below fixed this completely for me (on Ubuntu):

    '.platform-win32, .platform-linux':
      'alt': 'abort!'
      'alt-f1': 'window:toggle-menu-bar'
    

    This actually works for disabling the default Alt binding as well!

    It behaves a little differently than Alt, because the menu bar stays visible until you toggle it back off (and there's the popup, like @LoLei mentioned). I don't mind the "permanent" toggle, I actually prefer it that way.

  17. pvorona commented on Dec 28, 2015

    @pvorona

    @kankaristo that worked for me

  18. mengzyou commented on Dec 29, 2015

    @mengzyou
    Author

    @kankaristo Yes, it works, thank you!

  19. supreme-gentleman commented on Jan 23, 2016

    @supreme-gentleman

    @LoLei Your rebinding idea was great, It worked...but now that I'm using Arch Linux the '.platform-win32, .platform-linux': line doesn't work anymore, I don't know why, but my solution works great, and I can still toggle menu from the settings window(if I ever need it), so If there's any other Linux user here using any other distro than Ubuntu and reading this, they can still bind alt key to nothing and rebind to other keys if they want to. You should already close this issue @mengzdsd :)

  20. leonardoarroyo commented on Jul 25, 2016

    @leonardoarroyo

    @kankaristo fix works. Thanks! 👍

  21. pcnate commented on Aug 2, 2016

    @pcnate

    @kankaristo This works. However this now pops up a notification about the menu bar getting hidden.

  22. mengzyou commented on Aug 3, 2016

    @mengzyou
    Author
    '.platform-win32, .platform-linux':
      'alt': 'abort!'
      'alt-f1': 'window:toggle-menu-bar'
    

    With @kankaristo 's solution, this issue can be closed.

  23. lock commented on Apr 6, 2018

    @lock

    This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!

  24. locked and limited conversation to collaborators on Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buglinuxwindows

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions