From ec2da5adef351153216987deae8fdb4cb8a74568 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Wed, 10 Jan 2024 03:57:32 -0800 Subject: [PATCH] Docs: document keyboard shortcuts --- docs/13 - Keyboard Shortcuts.md | 20 ++++++++++++++++++++ js/main.js | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 docs/13 - Keyboard Shortcuts.md diff --git a/docs/13 - Keyboard Shortcuts.md b/docs/13 - Keyboard Shortcuts.md new file mode 100644 index 00000000..b48c7da7 --- /dev/null +++ b/docs/13 - Keyboard Shortcuts.md @@ -0,0 +1,20 @@ +# Keyboard Shortcuts + +#### General + +| Shortcut | Description | +|-------------------------|--------------------------------------------------| +| Esc | Stop generation | +| Tab | Switch between current tab and Parameters tab | + +#### Chat tab + +| Shortcut | Description | +|-------------------------|--------------------------------------------------| +| Ctrl + S | Show/hide chat controls | +| Ctrl + Enter | Regenerate | +| Alt + Enter | Continue | +| Ctrl + Shift + Backspace| Remove last | +| Ctrl + Shift + K | Copy last | +| Ctrl + Shift + L | Replace last | +| Ctrl + Shift + M | Impersonate | diff --git a/js/main.js b/js/main.js index bc8c785d..45f5021f 100644 --- a/js/main.js +++ b/js/main.js @@ -99,7 +99,7 @@ document.addEventListener("keydown", function(event) { } // Switch between tabs on Tab - else if (!event.ctrlKey && !event.shiftKey && event.key === "Tab") { + else if (!event.ctrlKey && !event.shiftKey && !event.altKey && !event.metaKey && event.key === "Tab") { event.preventDefault(); var parametersButton = document.getElementById("parameters-button"); var parentContainer = parametersButton.parentNode;