inkdropapp/inkdrop-vim

'Ctrl-[' not working on Windows

Closed this issue · 5 comments

Hello,
It doesn't appear that 'Ctrl-[' remaps the esc key for vim in inkdrop.

I've placed the following command in my keymap file but the command still does not work:

{
  ".CodeMirror.vim-mode.normal-mode textarea": {
    "ctrl-[": "vim-mode: reset-normal-mode"
  }
}

For reference the keyboard I am using is an HHKB Hybrid Type-S with a standard ANSI layout.

Thank you

Hi.
vim-mode: reset-normal-mode is not correct. Do not insert a space after the colon.

{
  ".CodeMirror.vim-mode.normal-mode textarea": {
    "ctrl-[": "vim:reset-normal-mode"
  },
  ".CodeMirror.vim-mode.insert-mode textarea": {
    "ctrl-[": "vim:reset-normal-mode"
  },
  ".CodeMirror.vim-mode.replace-mode textarea": {
    "ctrl-[": "vim:reset-normal-mode"
  },
  ".CodeMirror.vim-mode.visual-mode textarea": {
    "ctrl-[": "vim:exit-visual-mode",
  }
}

Hi @craftzdog , thank you for the great app!
I had the same problem on Windows. My keyboard is RealForce UB87 and it's a US keyboard. Replacing ctrl-[ to j j also didn't work... Do you have any idea for this?

{
  '.CodeMirror textarea': {
    'ctrl-[': "false",
    'ctrl-]': "false"
  },
  ".CodeMirror.vim-mode.normal-mode textarea": {
    "ctrl-[": "vim:reset-normal-mode"
  },
  ".CodeMirror.vim-mode.insert-mode textarea": {
    "ctrl-[": "vim:reset-normal-mode"
  },
  ".CodeMirror.vim-mode.replace-mode textarea": {
    "ctrl-[": "vim:reset-normal-mode"
  },
  ".CodeMirror.vim-mode.visual-mode textarea": {
    "ctrl-[": "vim:exit-visual-mode"
  }
}

image

Hi,

The commands are different for the other modes. Can you please try the following keymap?:

  ".CodeMirror.vim-mode.insert-mode textarea": {
    "ctrl-[": "vim:exit-insert-mode"
  },
  ".CodeMirror.vim-mode.replace-mode textarea": {
    "ctrl-[": "vim:exit-insert-mode"
  },
  ".CodeMirror.vim-mode.visual-mode textarea": {
    "ctrl-[": "vim:exit-visual-mode"
  }

Ref: https://github.com/inkdropapp/inkdrop-vim/blob/master/keymaps/vim.json#L145

Wow, worked perfectly... Thank you so much!

Great!