Added the ability to configure hotkeys via webui

Now you can configure the hotkeys directly through the settings

JS and Python scripts are tested and code style compliant
This commit is contained in:
Danil Boldyrev
2023-06-02 01:04:17 +03:00
parent c5d70fe1d3
commit 68c4beab46
2 changed files with 75 additions and 21 deletions

View File

@@ -0,0 +1,8 @@
from modules import shared
shared.options_templates.update(shared.options_section(('canvas_hotkey', "Canvas hotkeys"), {
"canvas_hotkey_move": shared.OptionInfo("F", "Moving the canvas"),
"canvas_hotkey_fullscreen": shared.OptionInfo("S", "Fullscreen Mode, maximizes the picture so that it fits into the screen and stretches it to its full width "),
"canvas_hotkey_reset": shared.OptionInfo("R", "Reset zoom and canvas positon"),
"canvas_hotkey_overlap": shared.OptionInfo("O", "Toggle overlap ( Technical button, neededs for testing )"),
}))