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.

Direct bindings should override prefixes? #49

Open

Description

@mkleehammer

There are a bunch of "ctrl-k .." bindings on Windows and Linux, but I want to bind ctrl-k to a delete-to-eol type of command (like bash or emacs). I would expect this binding to disable any prefixes. Otherwise I would have to track down every combination and set to them "unset!" or something.

Activity

  1. mndrix commented on Dec 25, 2014

    @mndrix

    I ended up creating an unset! rule at the top of my personal keybindings for every ctrl-k ... binding on Linux. For anyone that's interested, here's what I have:

    'body':
        "ctrl-k up": "unset!"
        "ctrl-k down": "unset!"
        "ctrl-k left": "unset!"
        "ctrl-k right": "unset!"
        "ctrl-k ctrl-w": "unset!"
        "ctrl-k alt-ctrl-w": "unset!"
        "ctrl-k ctrl-p": "unset!"
        "ctrl-k ctrl-n": "unset!"
        "ctrl-k ctrl-up": "unset!"
        "ctrl-k ctrl-down": "unset!"
        "ctrl-k ctrl-left": "unset!"
        "ctrl-k ctrl-right": "unset!"
    'atom-workspace atom-text-editor':
        "ctrl-k ctrl-u": "unset!"
        "ctrl-k ctrl-l": "unset!"
    "atom-workspace atom-text-editor:not([mini])":
        "ctrl-k ctrl-0": "unset!",
        "ctrl-k ctrl-1": "unset!",
        "ctrl-k ctrl-2": "unset!",
        "ctrl-k ctrl-3": "unset!",
        "ctrl-k ctrl-4": "unset!",
        "ctrl-k ctrl-5": "unset!",
        "ctrl-k ctrl-6": "unset!",
        "ctrl-k ctrl-7": "unset!",
        "ctrl-k ctrl-8": "unset!",
        "ctrl-k ctrl-9": "unset!"
    '.platform-win32, .platform-linux':
      'ctrl-k ctrl-b': 'unset!'
    '.platform-win32 atom-text-editor, .platform-linux atom-text-editor':
      'ctrl-k ctrl-d': 'unset!'
    
  2. stmichael commented on Jan 8, 2015

    @stmichael

    I implemented an alternative cursor movement using cmd and the keys i, k, j and l. cmd-k moves the cursor one line down. To make that work I had to unset all cmd-k bindings first. Doing so and defining the appropriate binding for the cursor movement worked until one or two weeks ago (don't know which version of Atom that was). But now with version 0.168.0 Atom always waits for the partial key binding timeout even if all cmd-k ... bindings have been unset. To me this is very annoying because for each line I move the cursor down I have to wait one second.

    I'm not sure if this belongs here or in a separate issue.

  3. eiof commented on Jan 14, 2015

    @eiof

    @stmichael, I am actually using your package and noticed this as well. I found this issue on my quest for a possible solution, haha.

    It would be neat if there was the ability to "unset all" partials, for example

    'body': 
      'cmd-k *': 'unset!'
    
  4. birbird commented on Jul 20, 2015

    @birbird

    Even unset all the "ctrl-k *" key bindings, ctrl-k still wait for the next input, can't response immediately.

    "body":
      "ctrl-k up": "unset!",
      "ctrl-k down": "unset!",
      "ctrl-k left": "unset!",
      "ctrl-k right": "unset!",
      "ctrl-k ctrl-w": "unset!",
      "ctrl-k ctrl-alt-w": "unset!",
      "ctrl-k ctrl-p": "unset!",
      "ctrl-k ctrl-n": "unset!",
      "ctrl-k ctrl-up": "unset!",
      "ctrl-k ctrl-down": "unset!",
      "ctrl-k ctrl-left": "unset!",
      "ctrl-k ctrl-right": "unset!"
    "atom-workspace atom-text-editor":
      "ctrl-k ctrl-u": "unset!",
      "ctrl-k ctrl-l": "unset!"
    "atom-workspace atom-text-editor:not([mini])":
      "ctrl-k ctrl-0": "unset!",
      "ctrl-k ctrl-1": "unset!",
      "ctrl-k ctrl-2": "unset!",
      "ctrl-k ctrl-3": "unset!",
      "ctrl-k ctrl-4": "unset!",
      "ctrl-k ctrl-5": "unset!",
      "ctrl-k ctrl-6": "unset!",
      "ctrl-k ctrl-7": "unset!",
      "ctrl-k ctrl-8": "unset!",
      "ctrl-k ctrl-9": "unset!"
    ".platform-win32 atom-text-editor, .platform-linux atom-text-editor":
      "ctrl-k ctrl-d": "unset!"
    ".platform-win32, .platform-linux":
      "ctrl-k ctrl-b": "unset!"
    ".platform-win32 .tree-view, .platform-linux .tree-view":
      "ctrl-k right": "unset!",
      "ctrl-k l": "unset!",
      "ctrl-k left": "unset!",
      "ctrl-k h": "unset!",
      "ctrl-k up": "unset!",
      "ctrl-k k": "unset!",
      "ctrl-k down": "unset!",
      "ctrl-k j": "unset!"
    
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions