Hotkeys doesn't show the correct keypresses (but Obsidian interprets the correct keypresses anyway)

How’s this for a weird one? The key combo I’ve chosen for a keyboard shortcut is represented incorrectly in the hotkeys preferences—but Obsidian still actually recognizes the keys I actually pressed, not the keys it shows. Obsidian v0.8.14, macOS 10.15.6, persists with default CSS.

1 Like

@ryanjamurphy, could you specify what exactly you are doing? I couldn’t reproduce this on Windows, but I could assign three different shortcuts to both functions and all of them work for left sidebar only. Is this the same bug or a different one?

Windows 10, Obsidian 0.8.14.

This may be a mac specific issue.

@AlexanderSavenkov @WhiteNoise I get accurate representations of other keyboard shortcuts. Only the one I demonstrated appeared differently in the list. It could be Mac-only though!

@ryanjamurphy Might also be worth checking your config file to make sure the shortcut is represented properly there.

Good tip. Indeed, the shortcut is not:

"app:toggle-left-sidebar": [
      {
        "modifiers": [
          "Alt",
          "Ctrl",
          "Mod",
          "Shift"
        ],
        "key": "”"
      }
    ],
    "app:toggle-right-sidebar": [
      {
        "modifiers": [
          "Alt",
          "Ctrl",
          "Mod",
          "Shift"
        ],
        "key": "’"
      }
    ],

…but still, it works. Maybe something on my OS is remapping the keys?

If anyone gets the chance to try these exact key combos in Obsidian on macOS, let me know!

I was trying to make some new shortcuts and was getting strange characters so came here to see if there was an issue.

I am getting the exact same behavior as you have described. Using on a Mac Pro, thought there might be an issue on my Mac Pro so tried on a MacBook Pro as well and I get the same behavior.

Thanks for the backup! How odd. If there’s two of us, it’s unlikely that we’ve both remapped keys somehow.

Are the shortcuts still functional for you?

This was the first time I have tried to put in or change and existing shortcut on v0.8.14. Did not have this issue back on v0.8.12.

As you said the shortcuts still work but if you forget what they were you can not go back and see what the shortcut was as it shows the odd characters.

1 Like

Are you still having this issue with v0.9.1? I’m still seeing this behavior.

Yep, though I don’t think the devs have taken a look at it yet!

Steps to reproduce

  • Open the shortcuts preferences pane.
  • Click to customize the hotkey for a shortcut, and type/press the hotkey. In this case, ⌘⌃⌥⇧ H for “Split Horizontal.” (However, any shortcut seems to works.)
  • The shortcut will work as expected, but the preview doesn’t display the correct character (though the modifiers are consistently correct).

Expected result

The preview should show ⌘⌃⌥⇧H or ⌘⌃⌥⇧h

Actual result

The preview shows ⌘⌃⌥⇧ Ó

For what it’s worth, here are some other examples:

  • ⌘⌥ L shows ⌘⌥┒
  • ⌘⌃⌥⇧ v shows instead ⌘⌃⌥⇧♢
  • ⌘⌃⌥ d shows instead ⌘⌃⌥∂
  • ⌘⌃⌥ r shows instead ⌘⌃⌥®
  • ⌘⌃⌥⇧ r shows instead ⌘⌃⌥⇧%∘ (this one’s weird because the r turns into two characters, the % and the additional tiny circle ∘)

Environment

  • Operating system: Mac OS Catalina 10.15.5
  • Obsidian version: v0.7.3
  • Using custom CSS: Yes.

Additional information

I’m on an English QWERTY layout.

I’ve tried with my external WASD keyboard and my internal keyboard. No difference. I’m using Karabiner to remap keys, but turning that off doesn’t fix it. I also can’t replicate outside Obsidian where (for example) hitting ⌘⌥⌃⇧ plus a letter actually types in an alternate character instead.

Might be related to Keyboard shortcuts on a non-English layout?

I think @Licat’s explanation on Discord here is why we get this bug.

I also have this issue and the fact that six months have passed since the last post, suggests that this is not an Obsidian bug but something to do with my macOS configuration. I am unable to see the previously mentioned Discord post so if anyone can enlighten me with the solution that would be just dandy.:grin:

@Ramst3r you’re not alone… I have this too on macOS 11, Obs 0.10.5 and going all the way back to at least 0.8.x releases.

One example for me is ⌘cmd⌥optw which I have mapped to “close active pane” but it displays the “w” as a “sigma”… ⌘cmd⌥optΣ

screenshot:
image

1 Like

Actually, on a whim I decided to delete the hotkey and re-map it, and it now displays and works correctly. 0.10.5

So may be worth another try @Ramst3r :upside_down_face:

@luckman212. I just updated to v0.10.6 and voila! … All is now fixed. Dodgy characters are no more.:+1: