[DE PE SSE] Change shortcut for alt hints on mac

This commit is contained in:
JuliaSvinareva 2022-10-06 19:03:16 +03:00
parent 14ae928ce4
commit 4b32e904e3

View file

@ -480,7 +480,7 @@ Common.UI.HintManager = new(function() {
_clearHints();
});
$(document).on('keyup', function(e) {
if (e.keyCode == Common.UI.Keys.ALT && _needShow && !(window.SSE && window.SSE.getController('Statusbar').getIsDragDrop())) {
if ((e.keyCode == Common.UI.Keys.ALT || e.keyCode === 91) && _needShow && !(window.SSE && window.SSE.getController('Statusbar').getIsDragDrop())) {
e.preventDefault();
if (!_hintVisible) {
$('input:focus').blur(); // to change value in inputField
@ -622,10 +622,11 @@ Common.UI.HintManager = new(function() {
}
}
_needShow = (Common.Utils.InternalSettings.get(_appPrefix + "settings-use-alt-key") && !e.shiftKey && e.keyCode == Common.UI.Keys.ALT &&
_needShow = (Common.Utils.InternalSettings.get(_appPrefix + "settings-use-alt-key") && !e.shiftKey &&
(!Common.Utils.isMac && e.keyCode == Common.UI.Keys.ALT || Common.Utils.isMac && e.metaKey && e.keyCode === Common.UI.Keys.F6) &&
!Common.Utils.ModalWindow.isVisible() && _isDocReady && _arrAlphabet.length > 0 &&
!(window.PE && $('#pe-preview').is(':visible')));
if (e.altKey && e.keyCode !== 115) {
if (!Common.Utils.isMac && e.altKey && e.keyCode !== 115) {
e.preventDefault();
}
});