Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Inconsistent behavior overriding character keys on Linux vs Windows #116

Open

Description

@CJKinni

On Windows, when I set 'k': 'core:cut' in a particular context, it will perform a cut. When I do the same on Linux, it will perform a cut then type a 'k'.

I'm working on a package to switch between an insert mode and a command mode similar to vim. My keybindings look like this:

'atom-text-editor':
  'escape': 'modal-keybindings:toggle'

'atom-text-editor.modal-command-mode':
  'y': 'core:redo'
  'z': 'core:undo'
  'k': 'core:cut'
  'v': 'core:paste'
  'o': 'core:save'
  'a': 'editor:move-to-beginning-of-word'
  's': 'editor:move-to-previous-subword-boundary'
  'd': 'editor:move-to-next-subword-boundary'
  'f': 'editor:move-to-end-of-word'

This format seems to work fine on Windows, but on Linux, the keybindings don't seem to be overriding the existing 'type a character' action, and instead the key performs the command and then types a character.

Activity

  1. CJKinni commented on Feb 29, 2016

    @CJKinni
    Author

    Apologies for closing and reopening.

    I believe I have a more clear example of what I suspect is going on.

    The following keymap behaves differently on Windows and Linux:

    '.editor':
      'j': 'core:cut'
    

    On windows, 'j' cuts the line. On Linux, 'j' cuts the line and inserts 'j'.

    It seems that using the dot-notation in the keymap.cson file produces inconsistent results across platforms.

  2. fracalo commented on Apr 1, 2016

    @fracalo

    confirm this behavior on 1.6.1.

    but seems to work as expected on:

    Atom    : 1.7.0-beta4
    Electron: 0.36.8
    Chrome  : 47.0.2526.110
    Node    : 5.1.1
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions