Skip to content

Conversation

@seorgiy
Copy link

@seorgiy seorgiy commented Jan 18, 2026

Problem

The keyboard shortcuts requires using a Latin-based keyboard layout.
For example, Ctrl+k on the Russian layout would result in Ctrl+л.

Assumptions

  • We want to stay with github/hotkeys library
  • We don't want to use event.code instead of event.key, as it discussed here
  • We don't want to mess with the KeyboardEvent due to possible browser-specific troubles and the security reasons
  • Hotkeys should work simultaneously in a Latin and non-Latin variant

Solution

Duplicate all the hotkeys for language-specific variants based on provided language key maps such as { k: 'л' } for the Russian example. This PR contains the Russian hotkey map and the functionality to add more.

Concerns

  • Still not sure we shouldn't switch for event.code approach
  • If we add a lot of key maps, it may lead to some conflicts, so we probably should make them user-controllable like an option «add keyboard support for: [multiple select from allowed keyboards]». But it doesn't make sense until we agree on the approach
  • In general this PR conflicts with custom shortcuts but it's mergeable

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 this pull request may close these issues.

1 participant