-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keyboard shortcuts wrong keyboard layout detection #2731
Comments
This might be a hyprland issue, as far as I know: wayland will set the keyboard settings via xorg. In my case, hyprland sets the layout correctly (Z is where it physically is), but reports the "us" layout to xorg:
I have no workaround, yet. |
Read carefully your output |
Keybindings do not work properly also in non-us keyboard layouts. For example I have the es-ES layout and I have to use the keys in the us layout for commands to be launched. |
I'm noticing a similar experience using DVORAK layout on a laptop's QWERTY hardware keyboard on Windows 10, where in version 0.3.0 the Ctrl key bindings are based on their hardware QWERTY positions while in version 0.2.8 they were based on their DVORAK positions. P.S. Thanks to everyone who volunteers their time to this project. I recently came across it and it looks cool! |
Same with koy on QWERTZ at arch linux. An overview of some shortcuts: This make lapce is unusable for me. |
Same problem for me, on Ubuntu 22.04, Regolith Desktop Environment (Xorg, I3 on top of GNOME). Also the normal mode vim-like bindings are wrong (mapped as if I was on US QWERTY). |
Same problem on MacOS 14.1.1 with Dvorak |
Same for me. Mac OS 14.1.2 with Dvorak layout. Lapce 0.3.1. Physical keyboard is a QWERTY, but the layout configured on the mac is Dvorak US. Looks like the app still see it as QWERTY. The problem started to happen after the recent update that introduced Floem for the UI |
Just wanting to add my +1 to this issue. Discovered and tried out lapce for the first time today. Looks really promising to be honest! Great work devs ✨ Sadly it's currently not usable since basically all hotkeys use the wrong keys to be activated. I'm using lapce 0.3.1 via flatpak on Fedora with sway right now. My keyboard layout is custom (should not matter which one, just not qwerty) |
I use a non-US keyboard layout, so this also makes the product unusable for me. |
same thing here with fr layout.
|
I am running sway, and launching without xwayland (force disabled). The editor functions normally, just keyboard shortcuts do not work correctly. |
I am hitting the same problem on vscode in wayland mode now. I think there is something seriously wrong. This all worked in the past, I am not sure any more if its an issue with lapce / vscode or with some other component... |
Same on windows with an AZERTY layout |
Anything new at this issue? It is a big deal breaker which make lape useless for all non us people/keyboards. |
I have reproduced the issue at least one time in gnome now. |
If there will be, it will be mentioned in this issue |
I'm affected by this issue as well and tried to analyze what may causing this issue. On a german keyboard layout (qwertz) when pressing Ctrl+Z the incoming KeyEvent is
which is mapped to
that is then used to find a command to be executed. I experimented a little bit and tried to use the value from the logical_key to get the corresponding KeyCode to appear in the resulting KeyPress.
See my PR #3001 It think this can fix many of the keyboard layout related issues but unfortunately not all. So not a final solution, but a first step :) |
This is potentially fixed by #3119 |
@RichardFevrier Would love to hear your feedback if the PR fixes the issue for you. It should be available on the latest nightly build. |
Thanks for asking @dzhou121 Just tested and it's working well for some shortcuts not so much for some others (I have deleted the entire E.g. Maybe something on my side, I've tested 2 differents linux desktop environment ( Thanks for reading me. |
I'm happy to report that the keybindings works with no problem here on Debian 12 Gnome Wayland with dvorak. |
Can I ask what's your keyboard layout? And out of interest, how does it look like in VSCode when you click |
Can confirm that the shortcuts seems to work again (german key board + koy layout) on commit 21e6719. But it looks like Update: |
Thanks for testing it. Can you please see what was the raw keyboard event in Lapce logs when you press Ctrl++ |
Dump question, but how do I get logs? I have try One additional information: the shortcut preview show correctly |
You can search "open log" in command palette. But I see it's a bug now, when we try to parse the keymap, we simply |
should be fixed by 0f90906 |
At the quertz layout at this position is caps lock. At the grafic it is called M3. |
Same problem with MacOS Sonoma (french keyboard - AZERTY). Good editor and looks promising but unusable when trying to add/change new keybindings |
should be fixed by #3143, can you please test it? |
Just to add some infos about my previous comment:
I have checked my inputs with
|
I get what you mean. But it’s the logic of Lapce that if shift is pressed, then we’ll use shift+key_before_modifier as the input. |
I see now; thanks for the explanation! |
Yeah |
sorry I was not able to test it until now. Because I did not have access to my tower last week and my laptop was not able to compile lapce, because it needs too much ram. I have test it again with the lasted commit and get this now: So it does still not detect it as Lapce hat also stop generating log for setting keyboard shortcuts. So I can not provide any. |
Just so you know there are nightly builds @LuckyTurtleDev |
From the log you showed earlier, Take US layout for example, |
Lapce Version
nightly-b4a6ec5
System information
Fedora Silverblue 38 Hyprland
Describe the bug
Using a non QWERTY keyboard resulting in wrong keys detection in the Keyboard Shortcuts section.
E.g.
Remapping
Ctrl+z
is detected asCtrl+w
for undo.In the rest of the editor everything seems working correctly even pressing
Ctrl+z
really performs undo action (after remapping, read my paragraph below).Why it is really a problem?
Because by default
Ctrl+z
is mapped to closing the file like aCtrl+w
would do... So non QWERTY keyboard users have to remap all non equivalent default shorcuts.The text was updated successfully, but these errors were encountered: