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.

ctrl + up/down inserts  or  #6949

Closed

Description

@dantman

I'm on OSX. Pressing ctrl + up/down inserts a  or  into the document, both show up as a square in the editor.

This is a problem for me personally because. ctrl + left/right is the key combo used to switch between spaces. And my keyboard's arrow buttons are a single square directional button. Which often results in my space switching between browser and Atom to be a combination of both a horizontal and vertical ctrl + arrow keypress.

OSX doesn't switch focus away from Atom till after it has finished transitioning to the other space. Because of this I'll often find myself switching away from Atom. Then switching back to find an edited file with an extra square sitting next to my cursor.

Once in awhile I forget to ⌘Z and I end up saving one of these into a file and have to hunt down the location of the script error it causes.

Activity

  1. mnquintana commented on May 26, 2015

    @mnquintana
    Contributor

    Are you using a non-U.S. keyboard layout? Can you reproduce this in safe mode? (atom --safe)

  2. dantman commented on May 26, 2015

    @dantman
    Author

    @mnquintana

    Are you using a non-U.S. keyboard layout? Can you reproduce this in safe mode? (atom --safe)

    Yes it happens in safe mode. No I'm not using a non-US keyboard layout.

  3. mnquintana commented on May 26, 2015

    @mnquintana
    Contributor

    What versions of Atom and OS X are you on?

  4. dantman commented on May 26, 2015

    @dantman
    Author

    OSX 10.9.5
    Atom 0.201.0

  5. maxpowa commented on May 28, 2015

    @maxpowa

    Are you accidentally bumping OPTION/ALT while pressing CTRL? I've noticed that if I fat-finger the CTRL button and bump OPTION/ALT the box appears, but otherwise it does not.

  6. dantman commented on May 29, 2015

    @dantman
    Author

    @maxpowa That's impossible.

    The secondary keyboard I'm using is a Windows style keyboard with a "[Ctrl] [Super] [Alt]" layout instead of the mac "[Ctrl] [Option/Alt] [Super/Cmd]" layout. It's impossible for me to fat-finger the alt key since the Windows key is next to it, not alt.

    And no it's not the keyboard's fault, I can reproduce this on both the secondary keyboard and on the keyboard built in to my air.

    This happens exclusively on Ctrl + Up and Ctrl + Down.

    If I Cmd + Super + Up/Down then Atom would move a line up or down.

    If I Cmd + Alt + Up/Down then a new pane with a terminal in it opens up.

    If I Cmd + Shift + Up/Down then the multi-cursor/multi-edit mode happens with an additional cursor opening in the same column above or below the current one.

    Heck in the first place if I do anything other than Ctrl + Left/Right (ie: if I add any modifier key alt, super, or shift) then OSX's space switch doesn't happen. So that also makes it being the fault of any other modifier being impossible.

    Ultimately I can go into Atom. Carefully press only Crtl + Up or Ctrl + Down without making any mistake. And Atom will enter one of those boxes into the editor.

  7. lee-dohm commented on May 29, 2015

    @lee-dohm
    Contributor

    Have you tried using the Keybinding Resolver Cmd+.? It will show you what key Atom saw you press and the command that was triggered because of it.

    On my machine Ctrl+Up activates Mission Control, so I can't reproduce this right now. In addition to the Keybinding Resolver, if you:

    1. Open the Keyboard preferences pane (for OS X)
    2. Select the Shortcuts tab

    What do you see for "Mission Control"? Did you just uncheck the box to disable it? Or did you actually change the OS-level key binding?

  8. dantman commented on May 29, 2015

    @dantman
    Author

    Using the Keybinding Resolver, Atom says "native!".

    In [Settings > Mission control] my Mission control setting is - (unset).

    In [Keyboard preferences > Shortcuts > Mission control] the box is unchecked. The keybinding remains as ^↑.

    If I enable Mission control as-is Atom doesn't receive any keyboard input when the Mission control action activates.

    If I change the Mission control shortcut to ^5 and enable it. Ctrl+Up still says "native!" and Atom enters the box into the editor.

    If I change the setting to Fn in [Settings > Mission control] instead Atom still does the same thing.

    If I change my keyboard input source from "Canadian English" to "British", "U.S.", "Rōmaji", "Hiragana", or "Katakana" Atom still does the exact same thing.

    Is there a way I can intercept the keyboard events Atom gets besides the Keybinding Resolver that will let me inspect the raw event data Atom receives in the dev console?

  9. lee-dohm commented on May 29, 2015

    @lee-dohm
    Contributor

    @dantman Yes, there is a way that you can attach to the DOM and capture the raw key event, but I don't know it off the top of my head. You should be able to find it by looking for JavaScript methods for capturing key events though.

    Let me replicate what you're seeing on my machine.

  10. lee-dohm commented on May 29, 2015

    @lee-dohm
    Contributor

    I replicated this using the following process using Atom v0.202.0-60fbb1d on Mac OS X 10.10.3:

    1. Close all instances of Atom (just in case)
    2. Open OS X Keyboard Preferences
    3. Select the Shortcuts tab
    4. Uncheck the box next to "Mission Control"
    5. Start Atom
    6. Open a new file
    7. Press Ctrl+Up

    Expected: Nothing to be inserted into the file
    Actual: The UTF-8 triplet 0xEF 0x9C 0x80 is inserted (corresponds to U+F700)

  11. acalc commented on Jun 26, 2015

    @acalc

    Don't know if this helps any, but I'm also experiencing this bug (in the official 1.0 release of Atom). I'm on OS X 10.10.3 as well. It doesn't matter which input source I'm using, or which actual keyboard (it inserts the UTF-8 triplet with either the iMac wireless keyboard or the Das Keyboard 4 Professional I use). The character is printed regardless of whether or not the Mission Control box is checked.

    I stumbled on this bug when I was trying to add some keybindings after installing the emacs-plus package.

  12. lee-dohm commented on Jun 28, 2015

    @lee-dohm
    Contributor

    It sounds like this is the same underlying issue as atom/atom-keymap#70

  13. lock commented on Jan 21, 2019

    @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!

  14. locked as resolved and limited conversation to collaborators on Jan 21, 2019
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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions