Docs: document keyboard shortcuts

This commit is contained in:
oobabooga 2024-01-10 03:57:32 -08:00
parent b3fc2cd887
commit ec2da5adef
2 changed files with 21 additions and 1 deletions

View File

@ -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 |

View File

@ -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;