Vim mode: shortcuts involving AltGr don't work

In Vim mode, keyboard shortcuts such as fx, tx, vix and so on don’t work if x is a character that requires pressing AltGr, such as {[]}$€@\ on the German (or Finnish) keyboard layout.

This happens both in source mode and live preview mode.

The cursor behaves as expected if I change the layout to US. The behavior is also correct with the Finnish keyboard layout in the Codemirror Vim test page.

Steps to reproduce

  1. Enable vim mode
  2. Set keyboard layout to German
  3. Type some text with curly brackets in it and move the cursor to the beginning of the line
  4. Try to jump to the first curly bracket by typing f{, i.e. f and then AltGr + 7

Expected result

The cursor should jump to the curly bracket.

Actual result

The cursor jumps to the previous paragraph, as if only typing the curly bracket without the f.

Environment

  • Operating system: Ubuntu 20.04
  • Debug info:
    SYSTEM INFO:
    Obsidian version: v0.14.5
    Installer version: v0.12.15
    Operating system: #44~20.04.1-Ubuntu SMP Thu Mar 24 16:43:35 UTC 2022 5.13.0-39-generic
    Login status: logged in
    Catalyst license: insider
    Insider build toggle: off
    Live preview: on
    Legacy editor: off
    Base theme: dark
    Community theme: none
    Snippets enabled: 0
    Safe mode: on

RECOMMENDATIONS:
none

download and reinstall obsidian.

Does it happen is source mode?
Does it happen here CodeMirror: Vim bindings demo?

I downloaded the latest AppImage, version 0.14.6.

Happens in both source mode and live preview.

Does not happen in the CodeMirror demo.

does it happen here https://codemirror-vim--util.repl.co/ ?

Upstream bug report:

1 Like

I found the issue:

I wrote this simple plugin to fix it, that works at least on Linux for me:

Upstream fix will be included in 0.15.3.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.