New hotkey: Alt+Enter to Continue

This commit is contained in:
Cohee 2023-08-31 14:54:35 +03:00
parent 05f3a5d8a1
commit 5f5407777f
2 changed files with 10 additions and 6 deletions

View File

@ -906,7 +906,7 @@ export function initRossMods() {
//Enter to send when send_textarea in focus //Enter to send when send_textarea in focus
if ($(':focus').attr('id') === 'send_textarea') { if ($(':focus').attr('id') === 'send_textarea') {
const sendOnEnter = shouldSendOnEnter(); 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(); event.preventDefault();
Generate(); Generate();
} }
@ -949,9 +949,13 @@ export function initRossMods() {
console.debug("Ctrl+Enter ignored"); console.debug("Ctrl+Enter ignored");
} }
} }
//ctrl+left to show all local stored vars (debug)
if (event.ctrlKey && event.key == "ArrowLeft") { // Alt+Enter to Continue
CheckLocal(); 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 // Helper function to check if nanogallery2's lightbox is active

View File

@ -4,10 +4,10 @@ Hotkeys/Keybinds:
<li><tt>Ctrl+Up</tt> = Edit last USER message in chat</li> <li><tt>Ctrl+Up</tt> = Edit last USER message in chat</li>
<li><tt>Left</tt> = swipe left</li> <li><tt>Left</tt> = swipe left</li>
<li><tt>Right</tt> = swipe right (NOTE: swipe hotkeys are disabled when chatbar has something typed into it)</li> <li><tt>Right</tt> = swipe right (NOTE: swipe hotkeys are disabled when chatbar has something typed into it)</li>
<li><tt>Ctrl+Left</tt> = view locally stored variables (in the browser console window)</li>
<li><tt>Enter</tt> (with chat bar selected) = send your message to AI</li> <li><tt>Enter</tt> (with chat bar selected) = send your message to AI</li>
<li><tt>Ctrl+Enter</tt> = Regenerate the last AI response</li> <li><tt>Ctrl+Enter</tt> = Regenerate the last AI response</li>
<li><tt>Escape</tt> = stop AI response generation</li> <li><tt>Alt+Enter</tt> = Continue the last AI response</li>
<li><tt>Escape</tt> = stop AI response generation, close UI panels, cancel message edit</li>
<li><tt>Ctrl+Shift+Up</tt> = Scroll to context line</li> <li><tt>Ctrl+Shift+Up</tt> = Scroll to context line</li>
<li><tt>Ctrl+Shift+Down</tt> = Scroll chat to bottom</li> <li><tt>Ctrl+Shift+Down</tt> = Scroll chat to bottom</li>
</ul> </ul>