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

Hotkeys don't work outside of English layout #86

Open
Tracked by #216
chekoopa opened this issue Aug 21, 2021 · 6 comments · Fixed by #227
Open
Tracked by #216

Hotkeys don't work outside of English layout #86

chekoopa opened this issue Aug 21, 2021 · 6 comments · Fixed by #227

Comments

@chekoopa
Copy link

How to reproduce: try pressing h on any hypha page or Ctrl-B in editor, when using Russian or another non-Latin keyboard layout.

I've localized it to static/shortcuts.js, as its code uses key property to retrieve the pressed key, however we also have layout-agnostic code property (and which, now deprecated). We can redo the code to use these values for hotkeys (convert Key* and Digit* keys, and maybe symbols, and cast everything else).

As an alternative, we could enable users to add their own shortcuts and partly circumvent the problem (also improving QoL for user JS plugins). Or do both proposed things.

That is actually a common problem in a variety of software (e.g. Vim, and even Github).

@bouncepaw
Copy link
Owner

Yeah, there is such a problem. I think it is not solvable because users may have weird keyboard layouts. That's why we kinda decided to ignore the problem for the time being. Perhaps @handlerug can save the day

@chekoopa
Copy link
Author

I think it is not solvable because users may have weird keyboard layouts.

I think we should just open the hotkey list (i.e. bind it to window) for other plugins. It'll also enable werid layout users to bind and remap by their tastes.

@bouncepaw
Copy link
Owner

I think I want to include йцукен hotkeys too now.

@chekoopa
Copy link
Author

chekoopa commented Apr 5, 2024

I still see the better option in implementing these through code (as it would match pieces of UX outside)

@bouncepaw
Copy link
Owner

Yeah, it's probably good, I'll take a look.

@bouncepaw
Copy link
Owner

Not actually fixed, tested on Chrome on Windows.

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

Successfully merging a pull request may close this issue.

2 participants