Skip to content

Commit

Permalink
add shortcut and README to pan tool
Browse files Browse the repository at this point in the history
  • Loading branch information
cracker0dks committed May 4, 2024
1 parent 8b64376 commit d73d9a3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
1 change: 1 addition & 0 deletions src/js/keybinds.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 3 additions & 0 deletions src/js/shortcutFunctions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()),
Expand Down

0 comments on commit d73d9a3

Please sign in to comment.