aboutsummaryrefslogtreecommitdiff
path: root/extensions-builtin/canvas-zoom-and-pan/scripts
diff options
context:
space:
mode:
authorDanil Boldyrev <daswerq123@gmail.com>2023-06-02 01:04:17 +0300
committerDanil Boldyrev <daswerq123@gmail.com>2023-06-02 01:04:17 +0300
commit68c4beab4669b64f31b92615d27ea7145effaaae (patch)
tree95573ccd4ebb8f6fb45d995ca1b1de341789d73a /extensions-builtin/canvas-zoom-and-pan/scripts
parentc5d70fe1d3681d551683791268ed34004a843589 (diff)
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
Diffstat (limited to 'extensions-builtin/canvas-zoom-and-pan/scripts')
-rw-r--r--extensions-builtin/canvas-zoom-and-pan/scripts/hotkey_config.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/extensions-builtin/canvas-zoom-and-pan/scripts/hotkey_config.py b/extensions-builtin/canvas-zoom-and-pan/scripts/hotkey_config.py
new file mode 100644
index 00000000..de2c4129
--- /dev/null
+++ b/extensions-builtin/canvas-zoom-and-pan/scripts/hotkey_config.py
@@ -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 )"),
+}))