add shortcut and README to pan tool

This commit is contained in:
Raphael 2024-05-04 23:19:33 +02:00
parent 8b643761c0
commit d73d9a3ee6
3 changed files with 5 additions and 0 deletions

View File

@ -67,6 +67,7 @@ The following are predefined shortcuts that you can override in the file [./src/
| Select an area | Ctrl + X | Command + X |
| Take the mouse | Ctrl + M | Command + M |
| Take the pen | Ctrl + P | Command + P |
| Take the pan tool (hand) | Ctrl + Space | Command + Space |
| Draw a line | Ctrl + L | Command + L |
| Draw a rectangle | Ctrl + R | Command + R |
| Draw a circle | Ctrl + C | Command + C |

View File

@ -16,6 +16,7 @@ const keybinds = {
"defmod-l": "setTool_line",
"defmod-r": "setTool_rect",
"defmod-c": "setTool_circle",
"defmod-space": "setTool_hand",
"defmod-shift-f": "toggleLineRecCircle",
"defmod-shift-x": "togglePenEraser",
"defmod-shift-r": "toggleMainColors",

View File

@ -22,6 +22,9 @@ const shortcutFunctions = {
$(".whiteboard-tool[tool=pen]").click();
whiteboard.redrawMouseCursor();
}),
setTool_hand: defineShortcut(() => {
$(".whiteboard-tool[tool=hand]").click();
}),
setTool_line: defineShortcut(() => $(".whiteboard-tool[tool=line]").click()),
setTool_rect: defineShortcut(() => $(".whiteboard-tool[tool=rect]").click()),
setTool_circle: defineShortcut(() => $(".whiteboard-tool[tool=circle]").click()),