From 5f5407777f01b60beb1e2ee5ca63ebe1821823cc Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Thu, 31 Aug 2023 14:54:35 +0300 Subject: [PATCH] New hotkey: Alt+Enter to Continue --- public/scripts/RossAscends-mods.js | 12 ++++++++---- public/scripts/templates/hotkeys.html | 4 ++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/public/scripts/RossAscends-mods.js b/public/scripts/RossAscends-mods.js index f4073fa8a..a958314e1 100644 --- a/public/scripts/RossAscends-mods.js +++ b/public/scripts/RossAscends-mods.js @@ -906,7 +906,7 @@ export function initRossMods() { //Enter to send when send_textarea in focus if ($(':focus').attr('id') === 'send_textarea') { const sendOnEnter = shouldSendOnEnter(); - if (!event.shiftKey && !event.ctrlKey && event.key == "Enter" && is_send_press == false && sendOnEnter) { + if (!event.shiftKey && !event.ctrlKey && !event.altKey && event.key == "Enter" && is_send_press == false && sendOnEnter) { event.preventDefault(); Generate(); } @@ -949,9 +949,13 @@ export function initRossMods() { console.debug("Ctrl+Enter ignored"); } } - //ctrl+left to show all local stored vars (debug) - if (event.ctrlKey && event.key == "ArrowLeft") { - CheckLocal(); + + // Alt+Enter to Continue + if (event.altKey && event.key == "Enter") { + if (is_send_press == false) { + console.debug("Continuing with Alt+Enter"); + $('#option_continue').trigger('click'); + } } // Helper function to check if nanogallery2's lightbox is active diff --git a/public/scripts/templates/hotkeys.html b/public/scripts/templates/hotkeys.html index 18e751bd9..ad6d6c5ba 100644 --- a/public/scripts/templates/hotkeys.html +++ b/public/scripts/templates/hotkeys.html @@ -4,10 +4,10 @@ Hotkeys/Keybinds: