[PR #2116] [CLOSED] feat: non-latin keyboard layout compatible shortcuts #9788

Closed
opened 2026-04-23 09:13:03 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-vikunja/vikunja/pull/2116
Author: @seorgiy
Created: 1/18/2026
Status: Closed

Base: mainHead: main


📝 Commits (1)

  • e3b40be Layout-compatible hotkeys

📊 Changes

10 files changed (+140 additions, -26 deletions)

View changed files

📝 frontend/src/components/home/ContentAuth.vue (+2 -1)
📝 frontend/src/components/home/MenuButton.vue (+2 -1)
📝 frontend/src/components/home/Navigation.vue (+6 -5)
📝 frontend/src/components/misc/OpenQuickActions.vue (+3 -2)
📝 frontend/src/components/misc/keyboard-shortcuts/shortcuts.ts (+56 -0)
📝 frontend/src/composables/useTaskDetailShortcuts.ts (+4 -1)
📝 frontend/src/directives/shortcut.ts (+9 -4)
frontend/src/i18n/hotkeyMaps.ts (+6 -0)
frontend/src/i18n/hotkeyMaps/russian.ts (+39 -0)
📝 frontend/src/views/tasks/TaskDetailView.vue (+13 -12)

📄 Description

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

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-vikunja/vikunja/pull/2116 **Author:** [@seorgiy](https://github.com/seorgiy) **Created:** 1/18/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`e3b40be`](https://github.com/go-vikunja/vikunja/commit/e3b40be37cba0b191ddcb4a3ff73fea2b12ecd4b) Layout-compatible hotkeys ### 📊 Changes **10 files changed** (+140 additions, -26 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/components/home/ContentAuth.vue` (+2 -1) 📝 `frontend/src/components/home/MenuButton.vue` (+2 -1) 📝 `frontend/src/components/home/Navigation.vue` (+6 -5) 📝 `frontend/src/components/misc/OpenQuickActions.vue` (+3 -2) 📝 `frontend/src/components/misc/keyboard-shortcuts/shortcuts.ts` (+56 -0) 📝 `frontend/src/composables/useTaskDetailShortcuts.ts` (+4 -1) 📝 `frontend/src/directives/shortcut.ts` (+9 -4) ➕ `frontend/src/i18n/hotkeyMaps.ts` (+6 -0) ➕ `frontend/src/i18n/hotkeyMaps/russian.ts` (+39 -0) 📝 `frontend/src/views/tasks/TaskDetailView.vue` (+13 -12) </details> ### 📄 Description ### 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](https://github.com/github/hotkey) library - We don't want to use `event.code` instead of `event.key`, as it discussed [here](https://github.com/github/hotkey/issues/34) - 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](https://github.com/go-vikunja/vikunja/pull/1889) but it's mergeable --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-23 09:13:03 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vikunja#9788