tgrosinger / leader-hotkeys-obsidian

Use a leader-key (tmux style) for hotkeys in Obsidian.md
GNU General Public License v3.0
79 stars 12 forks source link

Keypresses are not detected in Vim normal mode #32

Open colinphill-reify opened 2 years ago

colinphill-reify commented 2 years ago

Describe the bug When Vim emulation is enabled and the editor is in normal mode, keypresses which map to Vim commands are handled by the Vim emulator and not by this plugin.

To Reproduce Steps to reproduce the behavior:

  1. Create a new vault.
  2. Create a note which contains some text.
  3. Enable Vim key bindings.
  4. Install this plugin.
  5. Define a keymap of ⌘ + Ctrl + z d d to toggle reading view.
  6. Open the developer console to observe logs.
  7. Focus on your note in editing view and place your caret on some text. Press Esc to enter normal mode if not already in it.
  8. Press ⌘ + Ctrl + z d d.

This happens with any binding. For this example, I chose a binding whose leader key does not conflict with anything by default, and whose subsequent keys have an observable effect as a Vim command.

Expected behavior

Actual behavior

Desktop (please complete the following information):

thor314 commented 1 year ago

Replicates on Linux.

Not having leader keys in normal mode is pretty annoying. The alternative plugins (Sequence Hotkeys and Hotkey Chords) are even more buggy though.

Since my entire workflow basically relies on decent leader keys, and the two alternatives to this plugin are significantly worse, I'd gladly work on a PR if the author gave some guidance.

johannesCmayer commented 11 months ago

This would be very useful. I basically would like to have all my leader key hotkeys only work in normal mode

Ethnical commented 9 months ago

@johannesCmayer Exactly what I am looking for! Do we have a workaround to do so? I would like to have my bindings only working with normal mode in the style of nvim with which-keys plugin :)