zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
47.04k stars 2.7k forks source link

Shortcuts don't work with non-latin / international keyboard layouts #14053

Open leonovk opened 2 months ago

leonovk commented 2 months ago

Check for existing issues

Describe the bug / provide steps to reproduce it

If you switch the keyboard layout to another language, the hotkeys stop working. For example ctrl + s or ctrl + c

Environment

zed installed for arch linux https://archlinux.org/packages/extra/x86_64/zed/

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your Zed.log file to this issue.

Zed.log


notpeter commented 2 months ago

Can you provide some additional details:

  1. Which desktop environment are you using?
  2. Which tool are you using to switch keyboard layouts (setxkbmap, loadkeys, localectl, /etc/default/keyboard, etc)?
  3. Which language(s) or keyboard layout(s) are causing you trouble?
  4. What's the language/locale of your keyboard (QWERTY, QWERTZ, AZERTY, ÄWERTY, etc)
leonovk commented 2 months ago
  1. GNOME 46 Wayland
  2. To switch the keyboard layout, I use the default hotkey in the Gnome environment "super + spacebar". The language switches, but the hotkeys inside zed stop working.
  3. Hotkeys do not work when the Russian keyboard is on
  4. My keyboard has 2 layouts: Russian and English (QWERTY/ЙЦУКЕН)
AndyDroid10X commented 2 months ago

KDE 6.1.2 Wayland Fedora 40, rpm from Terra The same issue, the same layouts

yournumberone commented 2 months ago

same issue. ubuntu 24.04 gnome 46, qwerty/йцукен (eng/rus)

ruskiiamov commented 2 months ago

GNOME 42.9, Wayland Ubuntu 22.04.4 2 layouts: Russian and English (QWERTY/ЙЦУКЕН) The same issue

Beryesa commented 2 months ago

Not using the Russian layout but, using keycodes for stuff like the ` key instead of the actual character would help here as well i.e. if we can press the "key under esc" regardless of the layout. Because on mine the ` character is at AltGr + "," so doing Ctrl+AltGr+, is quite inconvenient :sweat_smile:

quendimax commented 1 month ago

MacOS has the same issue with shortcuts that use Opt key (for example Opt+T for a task run). Tested on MacBook Air M1, Sonoma 14.5

notpeter commented 1 month ago

MacOS has the same issue with shortcuts that use Opt key (for example Opt+T for a task run). Tested on MacBook Air M1, Sonoma 14.5

@quendimax Please do not hijack this thread one with off-topic comments, this is a linux specific keyboard layout issue. Please open a new issue if you're having trouble.

FYI your issue is likely because Opt+T is invalid. 1. Zed use lowercase alt on all platforms rather than the MacOS specific Option or Opt. 2. Zed use - not +.

Any of these should work: alt-t, alt-shift-t, alt-T -- if not open a new issue.

brookback commented 1 month ago

I have the same/similar issue, but on macOS, using Zed v0.149.0. Let me know if this goes into this existing issue or if I should file a new one.

macOS keyboard settings

Screenshot 2024-08-15 at 08 34 03
  1. Which desktop environment are you using? macOS
  2. Which tool are you using to switch keyboard layouts (setxkbmap, loadkeys, localectl, /etc/default/keyboard, etc)? None.
  3. Which language(s) or keyboard layout(s) are causing you trouble? Swedish.
  4. What's the language/locale of your keyboard (QWERTY, QWERTZ, AZERTY, ÄWERTY, etc). QWERTY.

Zed specs Zed: v0.149.0 (Zed Preview) OS: macOS 14.4.0 Memory: 32 GiB Architecture: aarch64

notpeter commented 1 month ago

@brookback Please file a new issue as your issue on MacOS is likely distinct. Please include full reproduction steps if possible. Thanks.

D3st0ny commented 3 weeks ago

same issue. nixos-unstable hyprland 0.42.0, qwerty/йцукен (eng/rus)

SylChamber commented 2 weeks ago

Same issue on Ubuntu 24.04 LTS, Wayland session, Canadian Multilingual layout. Mapping on the Quote ' key does not work (it's "è"), nor does the \ key (it's "à").

In VS Code, it maps ctrl+' (ctrl+è on the Canadian Multilingual layout) as ctrl-[Quote].

notpeter commented 1 week ago

There is an active discussion going on here:

We'd love to gather input from folks who are using international keyboards with Zed.