diff --git a/public/scripts/RossAscends-mods.js b/public/scripts/RossAscends-mods.js index 769d87d15..6d4110220 100644 --- a/public/scripts/RossAscends-mods.js +++ b/public/scripts/RossAscends-mods.js @@ -1018,6 +1018,14 @@ export function initRossMods() { return false; } + function isModifiedKeyboardEvent(event) { + return (event instanceof KeyboardEvent && + event.shiftKey || + event.ctrlKey || + event.altKey || + event.metaKey); + } + $(document).on('keydown', async function (event) { await processHotkeys(event.originalEvent); }); @@ -1141,7 +1149,8 @@ export function initRossMods() { $('#send_textarea').val() === '' && $('#character_popup').css('display') === 'none' && $('#shadow_select_chat_popup').css('display') === 'none' && - !isInputElementInFocus() + !isInputElementInFocus() && + !isModifiedKeyboardEvent(event) ) { $('.swipe_left:last').trigger('click', { source: 'keyboard', repeated: event.repeat }); return; @@ -1154,7 +1163,8 @@ export function initRossMods() { $('#send_textarea').val() === '' && $('#character_popup').css('display') === 'none' && $('#shadow_select_chat_popup').css('display') === 'none' && - !isInputElementInFocus() + !isInputElementInFocus() && + !isModifiedKeyboardEvent(event) ) { $('.swipe_right:last').trigger('click', { source: 'keyboard', repeated: event.repeat }); return; diff --git a/public/scripts/templates/hotkeys.html b/public/scripts/templates/hotkeys.html index 8dc04adf7..569ca5a92 100644 --- a/public/scripts/templates/hotkeys.html +++ b/public/scripts/templates/hotkeys.html @@ -5,7 +5,7 @@