In some cases when I try to enter certain Cyrillic letters defined in the third level of one of my keyboard layouts (one of default macOS layouts) Obsidian instead triggers shortcuts that are not listed in “Settings > Hotkeys”. This makes makes writing in Obsidian impossible because I just can’t type certain letters.
Please read the Additional information section because I found the root cause of this issue.
Steps to reproduce
- Get a device with macOS (this issue almost certainly happens only on macOS).
- Open “System Preferences > Keyboard > Input Sources”
- Click “+” to add keyboard layout.
- Choose “Russian” language
- Choose “Russian - PC” keyboard layout.
- Click “Add”.
- Open Obsidian editor and create an empty note.
- Type “Hello world”.
- Select “Russian - PC” layout.
At Step 6 I expected to type letter “і” (Cyrillic small dotted i).
At Step 7 I expected to type letter “І” (Cyrillic capital dotted i).
So the final text should look like “Hello worldіІ”.
Additionally I expect to see all Obsidian shortcuts in “Settings > Hotkeys”.
This is the way every other macOS editor behaves so you can reproduce same steps in VSCode, TextEdit etc. and make sure they type those letters instead of triggering shortcuts.
You can also see those characters if you open Keyboard Viewer from Input menu in the macOS menu bar.
At Step 6 no characters are typed and Obisidan moves cursor to the beginning of the word “world”.
At Step 7 no characters are typed and Obisidan moves cursor to the beginning of the word “Hello” and selects "Hello ".
So apparently Obsidian treats
Option-B) as shorcut to move cursor to the previous word; and
Shift-Option-B) as shortcut to select previous word. However these shortcuts are not displayed in “Settings > Hotkeys” and therefore cannot be modified or unbound.
- Operating system: macOS Catalina 10.15.7
- Obsidian version: 0.9.17
Obsidian uses CodeMirror as an editor. CodeMirror defines shortcuts in
CodeMirror.keyMap object. I’m on macOS and the default keymap for macOS is
However this keymap additionally specifies other keymaps as fallthrough:
CodeMirror.keyMap.macDefault.fallthrough=["basic", "emacsy"] and “emacsy” one unsurprisingly defines some emacs-like keybindings.
Option-B) happens to be one of those “emacsy” shortcuts that prevent me from typing some letters.
What is surprising though is that those emacs-like keybindings are default for every macOS user;
CodeMirror.keyMap.pcDefault only specifies “basic” keymap as fallthrough so you might not be able to reproduce this issue on other OS.
Using devtools I manually removed “emacsy” from the list of fallthrough keymaps by assigning
CodeMirror.keyMap.macDefault.fallthrough=["basic"]. After I’ve done that I was able to type those Cyrillic dotted i’s using
[Shift]-Option-B) immideatly without reloading Obsidian.
Can you please either remove “emacsy” from the list of CodeMirror’s fallthrough keymaps for the default macOS keymaps and/or allow to remap all Obsidian shortcuts in “Settings > Hotkeys”?