Skip to content

Commit

Permalink
Add CTRL modifier for keyboard shortcut
Browse files Browse the repository at this point in the history
As pointed out in RocketChat#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
  • Loading branch information
nicolasbock committed Nov 2, 2018
1 parent 2af94de commit d7d2f00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/rocketchat-ui-master/client/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit d7d2f00

Please sign in to comment.