Hotkeys pressed display a different character

Steps to reproduce

  1. use a QWERTZ keyboard
    • you can try to change your keyboard to another keyboard layout through your OS’s settings
  2. go to settings > hotkeys and pick a random command
  3. assign it a hotkey that involves a key not shared with a QWERTY keyboard (in this example I will be asigning ctrl + # to the command add alias)

Did you follow the troubleshooting guide? [Y/N]

Y

Expected result

For the chosen command the hotkey displays the keys used for the assignment, like ctrl + #

Actual result

The assigned hotkey is shown using a different key that would be accessible on a QWERTY keyboard but isn’t on a QWERTZ keyboard.
For the example the shown hotkey is ctrl + /.

As an important note, the hotkeys work properly, I can use e.g. ctrl + # to trigger the corresponding command, but the displayed hotkey is misleading.

This also applies to the command palette:

Environment

SYSTEM INFO:
Obsidian version: v1.8.10
Installer version: v1.8.4
Operating system: Windows 10 Home 10.0.19045
Login status: logged in
Language: en-GB
Catalyst license: none
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: off
Plugins installed: 0
Plugins enabled: 0

RECOMMENDATIONS:
none


Additional information

To provide visual context, here is a QWERTY keyboard.

And here is the QWERTZ keyboard layout I am using (german keyboard):
(both images courtesy of wikimedia)

If I want to assign a hotkey to a command using keys like #, the shown hotkey combination uses different symbols. The hotkeys work correctly, so pressing the entered hotkey does perform that command, but it is very confusing to see a different hotkey than the one you have just entered.

The issue is not that big of a deal right after assigning the hotkey, at that point in time it just creates some confusion. But in a day or a week I won’t have the information that the displayed hotkeys are wrong present in my mind. If I then search for a command like add alias with the quick switcher, and it then shows me a hotkey combination that does not correspond to the actual keys on my keyboard, that can cause a lot of confusion.

Below are the keys I found to show a different result after pressing it.

Entered Shown
# /
+ =
´ ]
ü ;
ä '
ö `
^ \
< Key226
`` ``

edit: missed a small section of template text & added debug info

Glad that it is mentioned in the documentation, but for me the issue isn’t with the functionality of hotkeys, they work fine.

One of the issue is that in the moment it is still confusing that the hotkey does not match what you have entered. Yes, I am now aware that this issue exists and is accepted behaviour, but I won’t necessarily have it actively in my mind the next time I’m in the hotkeys menu.

The other issue that to me is much more severe is that down the road it really impacts the parsing of commands. E.G. if I in two months I use the quick switcher to run the add file property command and I see that it is assigned to ctrl + ;, that information is not usable to me because it isn’t the actual hotkey that I need to press. And there is no way for me to figure out what that hotkey is aside from going to settings > hotkeys, click on the keyboard icon and try out different hotkeys until I find one that matches.
And to me that is not a solution.

Edit: I won’t be able to remember the mapping from the original comment, and other users won’t be aware of that mapping at all. I can look at that and figure out that ctrl + ; corresponds to ctrl + ü, but other users cannot. For them the shown hotkey is just a key combination that they cannot enter.

We have had several iterations on the hotkey capture and this is the least bad, meaning it works for most people. Until new, more comprehensive, APIs are introduced to capture keypresses are introduced we won’t change it. Sorry!

1 Like