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

Direct bindings should override prefixes? #49

Open
mkleehammer opened this issue Sep 16, 2014 · 4 comments
Open

Direct bindings should override prefixes? #49

mkleehammer opened this issue Sep 16, 2014 · 4 comments

Comments

@mkleehammer
Copy link

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.

@mndrix
Copy link

mndrix commented Dec 25, 2014

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

@stmichael
Copy link

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.

@eiof
Copy link

eiof commented Jan 14, 2015

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

@birbird
Copy link

birbird commented Jul 20, 2015

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants