How can I disable multi-keystroke keybindings completely?

Hi, there

I’m using my emacs-keybindings plugin.
This plugin binds ctrl-k to emacs-mode:kill-line command and it used to work well.
But from a certain inkdrop version, the command has been executed with some delay.

This is probably due to default key bindings which have multi-keystroke commands like ‘ctrl+k left’.
So I added following settings to my keymap.cson, but they changed nothing.

'.CodeMirror textarea':
  'ctrl-k left': false
  'ctrl-k up': false
'.mde-preview':
  'ctrl-k left': false
  'ctrl-k up': false
'.sidebar-menu':
  'ctrl-k right': false
'.sidebar-workspace-menu':
  'ctrl-k right': false
'.note-list-bar':
  'ctrl-k right': false
  'ctrl-k left': false

I want to execute the command immediately.
How can I disable multi-keystroke keybiindings completely?

Hi Shunichi,

Thank you for the question.
You are right, those keybindings cause the delay for the emacs keymap.
You have to remove keybindings like so:

var b = inkdrop.keymaps.keyBindings
inkdrop.keymaps.keyBindings = b.filter(a => !a.keystrokes.startsWith('ctrl-k '))

I found myself not using ctrl-k arrowkey shortcuts, so I’ll consider removing them.

Thank you for quick answer!

I’ll try it.

Fixed in v5.3.0🎉 Thanks again for the report. Credited here:

Hi Takuya,

How can I unbind the current core:toggle-bulleted-list keymap which conflicts with my workflow key and reassign it to ctrl-cmd-b?

@Bundit_Jianpinitnan You can unbind a keymap and reassign it with this:

{
  "body": {
    "cmd-shift-l": "unset!",
    "ctrl-cmd-b": "core:toggle-bulleted-list",
  }
}

For more information:

1 Like