From d7d2f00b736030260ba57cc3fb9a1a932744fa63 Mon Sep 17 00:00:00 2001 From: Nicolas Bock Date: Fri, 2 Nov 2018 05:39:40 -0600 Subject: [PATCH] Add CTRL modifier for keyboard shortcut As pointed out in #12519 Chrome already uses `Shift+ESC`, colliding with the 'mark all messages as read' keyboard shortcut in RocketChat. This change adds the `CTRL` modifier to the shortcut, i.e. mapping Shift+ESC | CTRL+ESC --- packages/rocketchat-ui-master/client/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/rocketchat-ui-master/client/main.js b/packages/rocketchat-ui-master/client/main.js index 05d6c9e33e00..1a181fd72a3b 100644 --- a/packages/rocketchat-ui-master/client/main.js +++ b/packages/rocketchat-ui-master/client/main.js @@ -24,7 +24,7 @@ Template.body.onRendered(function() { toolbarSearch.focus(true); } const unread = Session.get('unread'); - if (e.keyCode === 27 && e.shiftKey === true && (unread != null) && unread !== '') { + if (e.keyCode === 27 && (e.shiftKey === true || e.ctrlKey === true) && (unread != null) && unread !== '') { e.preventDefault(); e.stopPropagation(); modal.open({