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.
I probably found a related bug in v0.11.3
Using an alternative layout (e.g. https://neo-layout.org/) via setxkbmap de neo on linux results in problems with shortcuts and the command text-fields (to search for files or enter commands).
Shortcuts act as if they read the scan codes instead of the key set by the layout (e.g. ctrl+p has to be typed with the qwert* p instead of the neo p).
Additionally, the command text fields ignore the additional modifiers Mod3 and Mod4 introduced by the neo layout. Mod4 is also not working in the text editor. (e.g. to navigate with the arrow keys)