diff --git a/apps/common/main/lib/view/ReviewChanges.js b/apps/common/main/lib/view/ReviewChanges.js index 4c4c1239f2..1ae3019877 100644 --- a/apps/common/main/lib/view/ReviewChanges.js +++ b/apps/common/main/lib/view/ReviewChanges.js @@ -584,7 +584,7 @@ define([ } me.btnSharing && me.btnSharing.updateHint(me.tipSharing); me.btnHistory && me.btnHistory.updateHint(me.tipHistory); - me.btnChat && me.btnChat.updateHint(me.txtChat + Common.Utils.String.platformKey('Alt+Q')); + me.btnChat && me.btnChat.updateHint(me.txtChat + (!Common.Utils.isMac ? Common.Utils.String.platformKey('Alt+Q') : '')); if (me.btnCoAuthMode) { me.btnCoAuthMode.setMenu( diff --git a/apps/documenteditor/main/app/controller/DocumentHolder.js b/apps/documenteditor/main/app/controller/DocumentHolder.js index 84bcb1c79e..2c63f28020 100644 --- a/apps/documenteditor/main/app/controller/DocumentHolder.js +++ b/apps/documenteditor/main/app/controller/DocumentHolder.js @@ -148,7 +148,7 @@ define([ }; var keymap = {}; - me.hkComments = 'alt+h'; + me.hkComments = Common.Utils.isMac ? 'command+alt+a' : 'alt+h'; keymap[me.hkComments] = function() { if (me.api.can_AddQuotedComment()!==false) { me.addComment(); diff --git a/apps/documenteditor/main/app/controller/LeftMenu.js b/apps/documenteditor/main/app/controller/LeftMenu.js index 108f88eb0f..9ea36235fe 100644 --- a/apps/documenteditor/main/app/controller/LeftMenu.js +++ b/apps/documenteditor/main/app/controller/LeftMenu.js @@ -130,21 +130,22 @@ define([ isCommentsOnly: false } }; - Common.util.Shortcuts.delegateShortcuts({ - shortcuts: { - 'command+shift+s,ctrl+shift+s': _.bind(this.onShortcut, this, 'save'), - 'command+f,ctrl+f': _.bind(this.onShortcut, this, 'search'), - 'ctrl+h': _.bind(this.onShortcut, this, 'replace'), - 'alt+f': _.bind(this.onShortcut, this, 'file'), - 'esc': _.bind(this.onShortcut, this, 'escape'), - /** coauthoring begin **/ - 'alt+q': _.bind(this.onShortcut, this, 'chat'), - 'command+shift+h,ctrl+shift+h': _.bind(this.onShortcut, this, 'comments'), - /** coauthoring end **/ - 'f1': _.bind(this.onShortcut, this, 'help') - } - }); + var keymap = { + 'command+shift+s,ctrl+shift+s': _.bind(this.onShortcut, this, 'save'), + 'command+f,ctrl+f': _.bind(this.onShortcut, this, 'search'), + 'ctrl+h': _.bind(this.onShortcut, this, 'replace'), + 'esc': _.bind(this.onShortcut, this, 'escape'), + /** coauthoring begin **/ + 'command+shift+h,ctrl+shift+h': _.bind(this.onShortcut, this, 'comments'), + /** coauthoring end **/ + 'f1': _.bind(this.onShortcut, this, 'help') + }; + if (!Common.Utils.isMac) { + keymap['alt+f'] = _.bind(this.onShortcut, this, 'file'); + keymap['alt+q'] = _.bind(this.onShortcut, this, 'chat'); + } + Common.util.Shortcuts.delegateShortcuts({shortcuts:keymap}); Common.util.Shortcuts.suspendEvents(); }, diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js index af4cfc27c8..6c4c87f424 100644 --- a/apps/documenteditor/main/app/controller/Toolbar.js +++ b/apps/documenteditor/main/app/controller/Toolbar.js @@ -3166,7 +3166,8 @@ define([ toolbar.onCollaborativeChanges(); } } - disable ? Common.util.Shortcuts.suspendEvents('alt+h') : Common.util.Shortcuts.resumeEvents('alt+h'); + var hkComments = Common.Utils.isMac ? 'command+alt+a' : 'alt+h'; + disable ? Common.util.Shortcuts.suspendEvents(hkComments) : Common.util.Shortcuts.resumeEvents(hkComments); }, onSelectRecepientsClick: function(menu, item, e) { diff --git a/apps/documenteditor/main/app/view/LeftMenu.js b/apps/documenteditor/main/app/view/LeftMenu.js index 2595719d3b..2590c79b08 100644 --- a/apps/documenteditor/main/app/view/LeftMenu.js +++ b/apps/documenteditor/main/app/view/LeftMenu.js @@ -126,7 +126,7 @@ define([ this.btnChat = new Common.UI.Button({ el: $markup.elementById('#left-btn-chat'), - hint: this.tipChat + Common.Utils.String.platformKey('Alt+Q'), + hint: this.tipChat + (!Common.Utils.isMac ? Common.Utils.String.platformKey('Alt+Q') : ''), enableToggle: true, disabled: true, toggleGroup: 'leftMenuGroup' diff --git a/apps/presentationeditor/main/app/controller/DocumentHolder.js b/apps/presentationeditor/main/app/controller/DocumentHolder.js index c909e3ff44..44162d1c03 100644 --- a/apps/presentationeditor/main/app/controller/DocumentHolder.js +++ b/apps/presentationeditor/main/app/controller/DocumentHolder.js @@ -130,7 +130,7 @@ define([ // Hotkeys // --------------------- var keymap = {}; - me.hkComments = 'alt+h'; + me.hkComments = Common.Utils.isMac ? 'command+alt+a' : 'alt+h'; keymap[me.hkComments] = function() { if (me.api.can_AddQuotedComment()!==false && me.documentHolder.slidesCount>0) { me.addComment(); diff --git a/apps/presentationeditor/main/app/controller/LeftMenu.js b/apps/presentationeditor/main/app/controller/LeftMenu.js index a0a351eb2e..8088fc0a5a 100644 --- a/apps/presentationeditor/main/app/controller/LeftMenu.js +++ b/apps/presentationeditor/main/app/controller/LeftMenu.js @@ -118,21 +118,21 @@ define([ this.leftMenu.btnThumbs.on('toggle', _.bind(this.onShowTumbnails, this)); this.leftMenu.btnSearchBar.on('toggle', _.bind(this.onMenuSearchBar, this)); - Common.util.Shortcuts.delegateShortcuts({ - shortcuts: { - 'command+shift+s,ctrl+shift+s': _.bind(this.onShortcut, this, 'save'), - 'command+f,ctrl+f': _.bind(this.onShortcut, this, 'search'), - 'ctrl+h': _.bind(this.onShortcut, this, 'replace'), - 'alt+f': _.bind(this.onShortcut, this, 'file'), - 'esc': _.bind(this.onShortcut, this, 'escape'), - /** coauthoring begin **/ - 'alt+q': _.bind(this.onShortcut, this, 'chat'), - 'command+shift+h,ctrl+shift+h': _.bind(this.onShortcut, this, 'comments'), - /** coauthoring end **/ - 'f1': _.bind(this.onShortcut, this, 'help') - } - }); - + var keymap = { + 'command+shift+s,ctrl+shift+s': _.bind(this.onShortcut, this, 'save'), + 'command+f,ctrl+f': _.bind(this.onShortcut, this, 'search'), + 'ctrl+h': _.bind(this.onShortcut, this, 'replace'), + 'esc': _.bind(this.onShortcut, this, 'escape'), + /** coauthoring begin **/ + 'command+shift+h,ctrl+shift+h': _.bind(this.onShortcut, this, 'comments'), + /** coauthoring end **/ + 'f1': _.bind(this.onShortcut, this, 'help') + }; + if (!Common.Utils.isMac) { + keymap['alt+f'] = _.bind(this.onShortcut, this, 'file'); + keymap['alt+q'] = _.bind(this.onShortcut, this, 'chat'); + } + Common.util.Shortcuts.delegateShortcuts({shortcuts:keymap}); Common.util.Shortcuts.suspendEvents(); }, diff --git a/apps/presentationeditor/main/app/controller/Toolbar.js b/apps/presentationeditor/main/app/controller/Toolbar.js index e26f624e08..4522f0fb1e 100644 --- a/apps/presentationeditor/main/app/controller/Toolbar.js +++ b/apps/presentationeditor/main/app/controller/Toolbar.js @@ -2623,12 +2623,14 @@ define([ if (toolbar.btnsAddSlide) // toolbar buttons are rendered this.toolbar.lockToolbar(Common.enumLock.menuFileOpen, disable, {array: toolbar.btnsAddSlide.concat(toolbar.btnChangeSlide, toolbar.btnPreview)}); + + var hkComments = Common.Utils.isMac ? 'command+alt+a' : 'alt+h'; if(disable) { mask = $("