Skip to content
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

Support Cyrillic keyboard layout for shortcuts #793

Open
gildor opened this issue Jan 17, 2024 · 5 comments
Open

Support Cyrillic keyboard layout for shortcuts #793

gildor opened this issue Jan 17, 2024 · 5 comments

Comments

@gildor
Copy link

gildor commented Jan 17, 2024

Hello
I would like to suggest a feature that caused issues for me for years in Gmail, is the support of shortcuts when keyboard layout switched from Latin to Cyrillic

For example, Mac layout for Russian looks like this:

So when I want to use Archive and go next I press [, but if I didn't switch layout, it will send х (Cyricllic Kha), so shortcut doesn't work

This feature actually works in some programs and web sites, but not sure about implementation details

I understand that it's more complicated if support of other languages is needed (not all layouts are the same, even for Latin and Cyrillic, so it may require support of a large amount of keyboard layout), so maybe an option to add a custom keyboard shortcut as duplicate would solve my (and maybe not only mine) use case

@leggett
Copy link
Owner

leggett commented Jan 17, 2024

Gmail has an option to customize keyboard shortcuts which can be enabled under
https://mail.google.com/mail/#settings/advanced

But Simplify doesn't know what those custom shortcuts are and therefore can't respect them. Allowing you to also customize Simplify's shortcuts would be a fix here. That is on my to-do list but it is not an easy lift and I don't expect to do it soon.

There are two other problems going on here that I think could be improved sooner:

The first is with Simplify where I use a combination of keyboardEvent.key and keyboardEvent.code. I didn't realize those could ever be different from one another and now see that .code is mapped to the location of the key, not the key itself. I will address this in my next update of Simplify.

The second is with the Cyrillic keyboard layout, I suspect the problem is [ is not a one-key shortcut. That to send [ you have to use a modifier key. Does the shortcut work with Simplify turned off when you do that?

@gildor
Copy link
Author

gildor commented Jan 18, 2024

The second is with the Cyrillic keyboard layout, I suspect the problem is [ is not a one-key shortcut

I never really used it, because I just switch to English layout when sorting out my emails, but I checked and using key with [ in Cyrillic layout works with shift [ and without shift ] (both on key with ~ in English), but the usability problem for me is that I often do not know layout which I enabled last, so I just use the same key when archive email (if it doesn't work, change layout, press again)

Allowing you to also customize Simplify's shortcuts would be a fix here

I would add, that not only customizing, but adding multiple shortcuts on the same action, because my goal is to have the same shortcut for both layouts

I didn't realize those could ever be different from one another and now see that .code is mapped to the location of the key, not the key itself

huh, I don't see it now, this is exactly behavior which I would like to get, to have a shortcut on a key, not on a code

@leggett
Copy link
Owner

leggett commented Jan 18, 2024

Well we're going very deep down the rabbit hole... I'm wary of adding options to:

  • Customize Simplify's shortcuts
  • Let you assign multiple keys for the same shortcut
  • And/or opt to assign the shortcut to a specific button and not a key

All of that is doable and I realize the third may mean you don't need the second. But this is beyond the complexity I can support in the near term.

Let me start by fixing Simplify to use event.key instead of event.code and maybe you can tell me if that makes things any better.

@gildor
Copy link
Author

gildor commented Jan 23, 2024

Thanks so much! It looks very reasonable!
Let me know if you need help to test it before release, will be happy to help.

@leggett
Copy link
Owner

leggett commented Jan 23, 2024

My first changes here are live now for everyone in v3.1.7. It doesn't solve any the Alt+ or Option+ shortcuts (like Option+S to temporarily disable Simplify) but all the other ones should work correctly now.

Let me know how it goes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants