desktop icon indicating copy to clipboard operation
desktop copied to clipboard

Option + Letter Shows Special Characters in Keyboard Shortcuts

Open gitmichaelqiu opened this issue 7 months ago • 3 comments

Captchas

  • [x] I have read the instructions.
  • [x] I have searched existing issues and avoided creating duplicates.
  • [x] I am not filing an enhancement request.
  • [x] I have checked that this issue cannot be reproduced on Mozilla Firefox.
  • [x] I have checked that this issue can be reproduced once I removed all my Mods and Custom CSS.

What happened?

On macOS, when I try to assign a keyboard shortcut in the Keyboard Shortcuts settings, using combinations with the Option key + a letter results in special characters being registered instead of the intended letter. For example, pressing Option + D is shown as Option + ∂, and similar issues occur with other letters.

Image

Additionally, uppercase letters are automatically converted to lowercase in the display — for instance, Ctrl + A appears as Ctrl + a.

Thanks for looking into this!

Version

1.12.1b

What platform are you seeing the problem on?

macOS - aarch64

What component is this issue related to?

Keyboard Shortcuts

Relevant log output if applicable


gitmichaelqiu avatar May 07 '25 11:05 gitmichaelqiu

I have the same issue (or at least a closely related one) on Windows. For example, if try to enter the default shortcuts for split view (Ctrl + Alt + (U|V|H|G)) they get replaced with the following special characters.

Image

For reference I am using custom keyboard layout called EurKEY.

My personal workaround was to remove the Ctrl from the default shortcuts and then Zen detects the individual keys instead of just the special character. It is in itself a bit odd that the special characters get detected with the Ctrl as part of the shortcut and not without it, because when typing normally Alt + another key is used to insert the special characters (explicitly without any involvement of Ctrl)

I think this is a Firefox and not a Zen issue. While I didn't find directly analogous settings in Firefox for Browser keyboard shortcuts, I checked in the keyboard extension settings for extensions on Firefox and when typing Ctrl + Alt + <a letter> I simply get a popup that the shortcut must iclude either Ctrl or Alt, unlike in Zen I don't get to see the special character that replaced the shortcut, but still the replacement must take place since otherwise the shortcut would include both Ctrl and Alt.

https://github.com/user-attachments/assets/12c3005b-0868-4a0b-8acf-b995799e46ce

I also noticed the upper case/lower case thing, for me it initially displays as lower case, but when coming back to the settings later, it is displayed as upper case.

Edit: Seemingly not an issue with Firefox either, because the behavior in Chrome is almost identical to the one I had in Firefox (with setting extension shortcuts using both Ctrl and Alt plus a letter)

jnzd avatar May 15 '25 15:05 jnzd

same for me with Polish keyboard on Windows.

I cannot use most of the shortcuts, including toggling compact mode, switch workspace etc - it just types the letters with polish accents.

This works just fine in other apps, so probably it's something with hooking into keyboard handlers too late in the chain

qrzychu avatar May 19 '25 11:05 qrzychu

Same with the default English (UK) layout on Mac, shortcuts don't work for me either

Reflex2468 avatar May 24 '25 12:05 Reflex2468

I have the same issue with the default US keyboard layout on macOS 15.5.

For example:

The default for "Compact Mode - Toggle Floating Sidebar" ("Option+Cmd+S") does not work:

Image

For reference, the corresponding section in zen-keyboard-settings.json:

Image

If I replace the key combo in the browser using the same input ("Option+Command+s"), the field now shows:

Image

The corresponding block in zen-keyboard-settings.json is now:

Image

It looks like the option-key special characters in macOS is an issue.

I can work around this using keycodes. For example, "Developer Tools - Toggle DevTools" works with the keycode "KeyI":

Image

nimerix avatar May 29 '25 18:05 nimerix

I can also confirm this bug on the latest MacOS Sequoia 15.5. I could only workaround it by editing the shortcuts directly in zen-keyboard-settings.json (located at /Users/<your-username>/Library/Application Support/zen/Profiles/<something-something> (release)). 😕

lukas-runge avatar May 31 '25 11:05 lukas-runge

#8719 has just been merged and released into production with the latest version (v1.12.10b). I just tested it. It seems to work fine. Thank you @mauro-balades for reviewing and merging this so quickly! 🙏 I think this issue can be closed now. 💯

lukas-runge avatar Jun 01 '25 20:06 lukas-runge

Seems like the issues on Mac and Windows are separate, as for me on Windows 10 the behavior persists in 1.12.10b.

It is obviously a problem with non-english keyboard layouts. Like others in this thread I am using one, czech QWERTZ layout, and switching to standard EN(US) resolves both of the issues - the default bindings work and all of the letters can now be bound with ctrl + alt + letter combinations.

Of course using the browser without being able to write native language-specific characters is not viable, but at least the cause is obvious.

Like @jnzd I am also suspecting that this is a Firefox issue since the behavior in the keyboard shortcut settings for addons, which I was not previously aware of, shows the same behavior. Does not work with czech keyboard layout with some letters, works normally with english keyboard layout.

One thing is different for me: no special characters get inserted, instead the box shows first Alt + Ctrl +, and then when I press the letter as well, it switches to only showing the letter - but not a special character. This might just be the result of @lukas-runge 's patch, I don't know.

V17 avatar Jun 04 '25 22:06 V17

Hi, @gitmichaelqiu. I'm Dosu, and I'm helping the desktop team manage their backlog. I'm marking this issue as stale.

Issue Summary

  • Original issue: Keyboard shortcuts on macOS register special characters with the Option key.
  • Other users report similar issues on Windows with various keyboard layouts.
  • A patch (#8719) resolved the issue on macOS in version 1.12.10b.
  • The problem persists on Windows, possibly related to Firefox's handling of shortcuts.

Next Steps

  • Please confirm if this issue is still relevant to the latest version of the desktop repository.
  • If there is no further activity, the issue will be automatically closed in 7 days.

Thank you for your understanding and contribution!

dosubot[bot] avatar Jul 05 '25 16:07 dosubot[bot]