From d338a83d87909c455170bbb5910791c5dfc8f3ef Mon Sep 17 00:00:00 2001 From: Abel 'Akronix' Serrano Juste Date: Fri, 28 Oct 2016 16:19:25 +0200 Subject: [PATCH] Set different shortcut to switch conversation for mac users. Fixes #1249 --- app/js/directives.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/js/directives.js b/app/js/directives.js index ac113b64..e939cea6 100755 --- a/app/js/directives.js +++ b/app/js/directives.js @@ -769,8 +769,14 @@ angular.module('myApp.directives', ['myApp.filters']) return cancelEvent(e); } - if ( e.altKey && e.shiftKey && !e.ctrlKey && !e.metaKey && - e.keyCode >= 49 && e.keyCode <= 57 ) { // Alt + Shift + # , switch to conversation # where # is in [1..9] + if ( + (!Config.Navigator.osX && // No Mac users + e.altKey && e.shiftKey && !e.ctrlKey && !e.metaKey && + e.keyCode >= 49 && e.keyCode <= 57 ) // Alt + Shift + # , switch to conversation # where # is in [1..9] + || + (Config.Navigator.osX && // Mac users only + e.ctrlKey && e.shiftKey && !e.metaKey && !e.altKey && + e.keyCode >= 49 && e.keyCode <= 57 ) ) { // Ctrl + Shift + # , switch to conversation # where # is in [1..9] var dialogNumber = e.keyCode - 49, dialogWraps = $(scrollableWrap).find('.im_dialog_wrap'),