From 22b40aab5dc6505a1528d19e868c220ef989f0c5 Mon Sep 17 00:00:00 2001 From: "nikolaj.bassauer" Date: Thu, 22 Feb 2024 13:21:52 +0100 Subject: [PATCH] Set Shortcut to filter assignees --- client/lib/keyboard.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/client/lib/keyboard.js b/client/lib/keyboard.js index 3c06f8ce5..279b3dd6f 100644 --- a/client/lib/keyboard.js +++ b/client/lib/keyboard.js @@ -33,6 +33,14 @@ Mousetrap.bind('q', () => { } }); +Mousetrap.bind('a', () => { + const currentBoardId = Session.get('currentBoard'); + const currentUserId = Meteor.userId(); + if (currentBoardId && currentUserId) { + Filter.assignees.toggle(currentUserId); + } +}); + Mousetrap.bind('x', () => { if (Filter.isActive()) { Filter.reset(); @@ -181,6 +189,10 @@ Template.keyboardShortcuts.helpers({ keys: ['q'], action: 'shortcut-filter-my-cards', }, + { + keys: ['a'], + action: 'shortcut-filter-my-cards', + }, { keys: ['f'], action: 'shortcut-toggle-filterbar',