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.

Alt+{letter} menu shortcuts and arrow key navigation don't work on Windows and Linux #4057

Closed

Description

@jmm

The normal Windows Alt+{letter} menu shortcuts don't work in Atom. Holding Alt highlights the relevant letter in each menu name, but then pressing the letter doesn't open the menu. For example, Alt+F should open the File menu, but instead the Key Binding Resolver shows it invoking the following:

editor:move-to-end-of-word    atom-text-editor    resources\app\keymaps\emacs.json

This is a vanilla install of Atom 0.141.0 in Windows 7 Home Premium x64. I haven't opted in to enabling anything Emacs related.

Pressing Alt also doesn't focus the menu bar and allow it to be navigated by arrow keys like it normally does in Windows.

I'm reporting this per this suggestion

Activity

  1. added
    windows
    on Nov 7, 2014
  2. cebence commented on Nov 30, 2014

    @cebence

    I can confirm the same behavior using Atom 0.152 on Windows 7 x64.
    All Alt+? combinations open their menus except Alt+F and Alt+H.
    Also, arrow-key navigation between top menus doesn't work.

  3. pdl commented on Dec 4, 2014

    @pdl

    I also have this issue on Atom 0.152 on Fedora 20 Gnome x64.

    The default behaviour seems to be that there is no way to open the File menu from the keyboard. As @cebence notes, the fact that left and right arrows don't switch between menus exacerbates the problem.

    My experience is that arrow keys do work within a single menu, e.g. I can move from Edit/Undo to Edit/Redo using down, or from Edit/Lines to Edit/Lines/Indent with right, but cannot move from Edit to File.

    I propose the whole file atom/keymaps/emacs.cson is removed and that alt+LETTER should be reserved (by convention, at least) for opening menus as is the convention on Linux/Windows GUI applications. I think all of the features already have other mappings anyway.

    In fact, as far as I can see, most of the emacs keybindings that used to exist in https://github.com/atom/atom/blob/45c11e6fd4e2b82e7d134fbd5be73dd8faca2e6e/keymaps/emacs.cson (before it was moved to its current location) no longer function in the default setup anyway, so I suspect users used to using emacs might not notice. If anyone does object, it shouldn't be too hard to create a package which restores emacs compatibility.

    On the other hand it is currently impossible as far as I can see to sustainably make alt-f open the file menu, as a) the Key Binding Resolver doesn't notice 'alt-e' opening the menu so there's presumably no user-facing event being called, so I can't add a line to keymap.cson like 'alt-f': 'menu.file.open', and b) there doesn't seem to be anything you can add into keymap.cson to cancel a previous keybinding (I tried null).

    The only other alt+letter combination in the default install is 'alt-g', which is part of the Open on Github package and so could be disabled (although the fact that it works as a prefix, i.e. alt-g o, means it fits better with the way alt-keys and menus work, cf. alt-f o).

  4. Pajamaman commented on Feb 16, 2015

    @Pajamaman

    +1 emacs behavior should not be default, especially for keys related to operating menus.

  5. added
    linux
    on Apr 22, 2015
  6. kolAflash commented on May 6, 2015

    @kolAflash

    Workaround:

    Edit -> Prerferences -> Keybindings -> "your keymap file"
    keymap.cson

    'atom-text-editor':
    #  'alt-h': 'editor:delete-to-beginning-of-word'
      'alt-h': 'unset!'
    #  'alt-f': 'editor:move-to-end-of-word'
      'alt-f': 'unset!'
  7. linquize commented on May 22, 2015

    @linquize

    Why Ubuntu Unity does not have such problem?

  8. kolAflash commented on May 22, 2015

    @kolAflash

    @linquize
    Because on Unity the menu is not part of Atom, but of the Unity menubar. So Unity is handling the shortcuts and not Atom itself. Principally the same thing which happends on MacOSX.

  9. poelzi commented on Jun 25, 2015

    @poelzi

    This is a quite annoying bug. When you are new to a editor you often look into the wrong menu at first, having no left/right key there means mouse switching :(

  10. nycdotnet commented on Jun 26, 2015

    @nycdotnet

    This is also an accessibility issue as well.

    Even with the workaround, Atom still doesn't have the normal behavior on Windows which is to allow a single keypress of alt to be "sticky" and accept a second keypress after for the file menu. People who can only physically press one key at a time will have difficulty with Atom's menus.

    Thanks for posting your workaround, @kolAflash .

  11. pdl commented on Jun 27, 2015

    @pdl

    @kolAflash, thanks, that workaround works for me.

  12. joshas commented on Nov 8, 2015

    @joshas

    On Ubuntu 15.10 Atom 1.1.0 doesn't react to Alt+F if there is new untitled pane open and cursor is inside it. If I click on menu bar or any item in project sidebar - Alt+F works.
    Same issue with Alt+H. Other menu shortcuts seems to work (Alt + E, V, S, I, P).

  13. garretwilson commented on Dec 13, 2015

    @garretwilson

    This is extremely annoying. Please remove these key bindings from the editor by default. On Windows it is very irritating for the menus not to come up. Sure, there are workarounds, but I think that accessing the menus is something that should work out of the box without a workaround.

  14. bekroogle commented on Jan 3, 2016

    @bekroogle

    I'm a little surprised that this issue is still unresolved. There are a lot of ways to navigate the cursor among words in a line using the keyboard (worst case scenario, just press the arrow keys a bunch), but with the default keybindings, I haven't found a single way of opening the file menu without using the mouse.

    I quit using Atom for quite a few months in the past because this one behavior made me feel like the editor was still in some pre-alpha phase (it may have been at the time). I would imagine I'm not the only one who thought this was just a really glaring bug, instead of a counter-convention UX decision.

    Anyway, thanks to @kolAflash for the workaround. I really want to like Atom, and that helped a lot!

  15. 8 remaining items

  16. damieng commented on Oct 5, 2016

    @damieng
    Contributor

    Disable emacs.cson by default on Windows and Linux to avoid the conflict. Users wanting them will have to bind them themselves.

  17. damieng commented on Oct 5, 2016

    @damieng
    Contributor

    Add a setting to determine if they are enabled or not with a suitable warning. Disable by default on Windows/Linux but no rebinding required.

  18. damieng commented on Oct 5, 2016

    @damieng
    Contributor

    Move emacs.cson to a package that is only installed by default on macOS. (I don't think we have this ability today however)

  19. self-assigned this
    on Oct 5, 2016
  20. damieng commented on Oct 6, 2016

    @damieng
    Contributor

    On further investigation it turns out the more common Emacs ctrl bindings were completely missing for Windows and Linux users and nobody reported it.

    Given that I've made the alt and alt+ctrl emacs bindings Mac-only.

    Anyone who actually does want a full set can simply enter them into their keybindings file via File > Keybindings. Here's a sample list...

    'atom-text-editor':
      'ctrl-a': 'editor:move-to-first-character-of-line'
      'ctrl-e': 'editor:move-to-end-of-line'
      'ctrl-k': 'editor:cut-to-end-of-line'
      'ctrl-p': 'core:move-up'
      'ctrl-n': 'core:move-down'
      'ctrl-b': 'core:move-left'
      'ctrl-f': 'core:move-right'
      'ctrl-P': 'core:select-up'
      'ctrl-N': 'core:select-down'
      'ctrl-F': 'core:select-right'
      'ctrl-B': 'core:select-left'
      'ctrl-h': 'core:backspace'
      'ctrl-d': 'core:delete'
      'alt-f': 'editor:move-to-end-of-word'
      'alt-ctrl-f': 'editor:move-to-next-subword-boundary'
      'alt-F': 'editor:select-to-end-of-word'
      'alt-ctrl-F': 'editor:select-to-next-subword-boundary'
      'alt-b': 'editor:move-to-beginning-of-word'
      'alt-ctrl-b': 'editor:move-to-previous-subword-boundary'
      'alt-B': 'editor:select-to-beginning-of-word'
      'alt-ctrl-B': 'editor:select-to-previous-subword-boundary'
      'alt-h': 'editor:delete-to-beginning-of-word'
      'alt-ctrl-h': 'editor:delete-to-beginning-of-subword'
      'alt-d': 'editor:delete-to-end-of-word'
      'alt-ctrl-d': 'editor:delete-to-end-of-subword'
  21. damieng commented on Oct 6, 2016

    @damieng
    Contributor

    Going to close this issue now as it's fixed in master and will go out in 1.12. Emacs keys are not bound by default on Windows or Linux any more so ALT-F and ALT-H work fine for accessing the menu. (Many important emacs bindings were never present on these systems anyway).

    The shift-F10, tapping ALT issues etc. are actually Electron issues being tracked at electron/electron#2504

  22. rbenson commented on Mar 5, 2017

    @rbenson

    This issue has either not been fixed, or they been rolled back. alt+F and alt+H are still bound to editor:move-to-end-of-word and editor:delete-to-beginning-of-word by default

  23. damieng commented on Mar 5, 2017

    @damieng
    Contributor

    Working just fine here. What version of Atom are you on and what OS do you use?

    What are the contents of your File > Keymap

  24. rbenson commented on Mar 6, 2017

    @rbenson

    Atom v1.10.2, and win 10

    Keymap, added just before my last comment.

    'atom-text-editor':
       'alt-f': 'unset!'
    
  25. damieng commented on Mar 7, 2017

    @damieng
    Contributor

    Atom 1.10 is very old. The latest stable is 1.14. I believe the fixes went into 1.12.

  26. rbenson commented on Mar 7, 2017

    @rbenson

    Then the updater is broken because it says 1.10.2 is the latest stable version

  27. lock commented on Apr 2, 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!

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

Metadata

Metadata

Assignees

Labels

buglinuxwindows

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions