From 1f8150b1675aa12269c134d105c79bceb1c50b53 Mon Sep 17 00:00:00 2001 From: kolaente Date: Fri, 27 Jun 2025 13:46:48 +0200 Subject: [PATCH] feat(list): add j/k keyboard navigation (#1040) Partially resolves https://community.vikunja.io/t/keyboard-shortcut-next-previous-tasks-in-a-project/1971/7?u=kolaente --- .../misc/keyboard-shortcuts/shortcuts.ts | 18 +++++ .../components/project/views/ProjectList.vue | 69 ++++++++++++++++++- .../tasks/partials/SingleTaskInProject.vue | 9 ++- frontend/src/i18n/lang/en.json | 6 ++ 4 files changed, 99 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/misc/keyboard-shortcuts/shortcuts.ts b/frontend/src/components/misc/keyboard-shortcuts/shortcuts.ts index e6b4dad91..f5826d986 100644 --- a/frontend/src/components/misc/keyboard-shortcuts/shortcuts.ts +++ b/frontend/src/components/misc/keyboard-shortcuts/shortcuts.ts @@ -60,6 +60,24 @@ export const KEYBOARD_SHORTCUTS: ShortcutGroup[] = [ }, ], }, + { + title: 'keyboardShortcuts.list.title', + available: (route) => route.name === 'project.view', + shortcuts: [ + { + title: 'keyboardShortcuts.list.navigateDown', + keys: ['j'], + }, + { + title: 'keyboardShortcuts.list.navigateUp', + keys: ['k'], + }, + { + title: 'keyboardShortcuts.list.open', + keys: ['enter'], + }, + ], + }, { title: 'project.kanban.title', available: (route) => route.name === 'project.view', diff --git a/frontend/src/components/project/views/ProjectList.vue b/frontend/src/components/project/views/ProjectList.vue index 232a39535..80ce68e4d 100644 --- a/frontend/src/components/project/views/ProjectList.vue +++ b/frontend/src/components/project/views/ProjectList.vue @@ -65,8 +65,9 @@ @start="() => drag = true" @end="saveTaskPosition" > -