add "Ctrl+Space" shortcut

dev
pon 2023-05-31 08:23:23 +09:00 committed by GitHub
parent 08796aae29
commit d25f57b208
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@ Simple tab switcher for Stable Diffusion WebUI
https://github.com/AJpon/a1111-sd-webui-quickswitch/assets/49616225/9058fd46-d352-45bd-84d9-264e2a69c16e
## How to use
Double press the **Alt key** to open the switcher
Double press the **Alt key** or press **Ctrl + Space** to open the switcher
Enter the desired tab name. A list of tabs will appear, click on the desired tab.
### Note

View File

@ -42,7 +42,7 @@
function handleAltKeyDown(event) {
let now = Date.now();
if (event.key === 'Alt' && now - lastAltKeyDownTime < 500) {
if ((event.key === 'Alt' && now - lastAltKeyDownTime < 500) || (event.ctrlKey && event.code === 'Space')) {
openSearchBox();
}
lastAltKeyDownTime = now;