macOS app window switching hotkey doesn't work

Steps to reproduce

  • Have custom keyboard layout that remaps `/~ key (I can provide the layout or instructions how to make such a layout)
  • Press ⌘-`

Expected result

Another window of Obsidian should come to top.

Actual result

Nothing happens.

Environment

  • Operating system: macOS 11.2
  • Obsidian version: 0.11.7, also observed since at least 0.10.11

Additional information

I have a macbook with the UK keyboard. The keyboard has `/~ key right above Control key. I used to have it right under Escape key. Rather than retraining muscle memory I decided it’s easier to change the keyboard layout. I use a custom keyboard layout based on the default en-US provided by macOS with the two keys switched.

Obsidian seem to rely on raw key code rather than the assigned key output.

If I press the key that was initially assigned ` Obsidian switches the windows.

This is also confirmed by the fact that a different method of key rebinding works. Specifically, Karabiner is a virtual keyboard driver. It intercepts keycodes and remaps them before the OS processes them. With this method Obsidian properly responds to the shortcut.