Some hotkeys are not working when keyboard is in an alternative language layout.
Examples that DO work are: Ctrl+I, Ctrl+B
Examples that do NOT work are below
Steps to reproduce
Switch to Russian layout
Try using any of the following hotkeys:
Ctrl+N to create a new note
Alt+Enter works only with left Alt, but not with right (very strange)
Ctrl+Shift+F
Ctrl+F
Ctrl+H
Ctrl+,
Ctrl+W
Expected result
Pressing the same buttons on a keyboard for hotkeys should call a hotkey assigned function no matter what language layout is active at the moment
This IS a bug, since practically every other piece of software behaves in a way that you donāt need to switch layouts to press a shortcut. Thatās the whole point of shortcut being short!
I have the same bug with french keyboard (AZERTY) on mac osx:
When I try to bind the shift / maj key (ā§) I get strange behavior with the ācustomize this commandā feature and obviously the shortcut doesnāt work.
To be more precise
With french AZERTY keyboard layout: when I try to bind āāā§Pā I get āāā§Unidentifiedā and the shortcut doesnāt work.
If I put the US QWERTY keyboard layout everything works perfectly.
Partial fix
Funny thing is that the bug with the french keyboard and the shift key can works with caps lock on: when activated, both ācustomize this commandā and short works.
Same on Windows 10 with Obsidian 0.8.9. Trying to customize commands with combinations of Win key and letters gives me unidentified hotkey or is simply ignored.
VS Code is also based on Electron and thereās no such problem there: hotkeys in all major keyboard layouts work perfectly fine.
Maybe Obsidian developers or someone better in code than I am can figure out what has VS Code that Obsidian lacks.
I can confirm the same issue with an Arabic layout on Obsidian 0.9.17
I think the issue is the Obsidian looks at the letters entered to detect hotkeys, instead of the physical key that is pressed. Most other software looks at the physical key pressed.
Possible way to find workaround:
I tried to create workaround using remapping with AutoHotkey but succeeded only when I simulated also the layout switching which is not elegant.
Here is experimental code that works on my laptop Thinkpad X220 with Windows 7 when English and one more layout (e.g. Russian) are installed and the second layout is active. Not practical yet, just for playing around:
; # AutoHotkey script restricted to Obsidian
; comments are after semicolon
; ` backtick is default escape character
; ^ stands for Ctrl+
; + stands for Shift+
; ! stands for Alt+
#IfWinActive ahk_exe Obsidian.exe
; remappings to fix hotkeys from Russian layout
^sc023::
sleep, 444 ; intentionally large for observing, not for practical use
Send, {LAlt down}{LShift down}{LShift up}{LAlt up} ; Switch layout
sleep, 444
Send, {LControl down}h{LControl up} ; Ctrl+H
; SendPlay, ^h ; Ctrl+H
; Send, ^{vk48}
sleep, 444
Send, {LAlt down}{LShift down}{LShift up}{LAlt up} ; Switch layout
return
#IfWinActive ; end restriction to Obsidian
To make it work from any installed layout, there would also need to be keyboard-layout detection.
Hi. The hotkeys were working perfect untill 0.10.1. I have upgraded to insider build 0.10.3 and now when, I press CTRL+W nothing happens. I have to press CTRL+Z to close a pane. I am on Azerty Belgian keyboard (almost like the French keyboard) and I have to use the querty keys. Of course I can set the hotkeys switched in the settings pannel and keep the original key but it also shows the wrong key in the setting pannel. The strange thing is that this is NOT happening with CTRL+A (azerty). Also CTRL+M (azerty) and CTRL+N (azerty) still works perfect.