International keyboard layout hotkeys not working

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

Actual result

Nothing happens

Environment

  • Operating system: Windows 10 1803 build .1425

  • Obsidian version: 0.6.4

  • Using custom CSS: original


12 Likes

This maybe a limitation of electron on windows since it seems to work on mac…

Still doesn’t work in 0.7.3 rendering it really annoying for any multiple-layout user (i.e. any non-English-only-writing user).

Kindly consider fixing in the next version.

When the layout differs from English, for example, Russian, hot keys do not work.

This may not be a bug, but it makes life very difficult :frowning:
I’m sorry, I don’t understand how to describe this on the required items

6 Likes

Yes, I experience that, too.

Noticed that it happens mostly with my custom hotkeys involving cmd+alt+shift+letter.

When I’m in my Bulgarian keyboard layout pressing the above hotkey doesn’t trigger any change. When I change back to English the hotkey works.

Simple hotkeys involving only cmd+letter work as expected even in non-English input language.

1 Like

The same! :roll_eyes:

It’s inconvenient to constantly switch the keyboard layout to use hotkeys. And with Vim bindings as well.

I have to switch the keyboard layout when I wanna write on my native language.

2 Likes

In Windows not work :frowning:

This may not be a bug

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!

1 Like

Hello,

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.

1 Like

Confirming, this still doesn’t work properly (Obsidian 0.8.4).
I’m on Linux, Elementary OS Hera.

3 Likes

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.

1 Like

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.

1 Like

Adding that autocompletion of backticks with German layout in Ubuntu 18.04 also seems affected

Hi! I’m using Ubuntu 20.04. And when I switch to the Russian language, shortcuts also don’t work.

Shortcuts only working in English layout. But in Dynalist for example, all shortcuts work in Russian layout too. It’s very uncomfortable.

2 Likes

Hello!
Win 10, v 0.9.7 - there is still a problem with hotkeys in the Russian layout :frowning:

A temporary working solution for me is to use keyboard shortcut in english and other layout

изображение

5 Likes

Still the problem in 0.9.10. Makes the app near unusable without duplicating all hotkeys as per @geohod suggestion.

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.

We will introduce a new way of handling keyboard shotcuts in 0.10.2. Let me know if it solves the issue.

1 Like

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.