VersaWhiteboard/public/js/keybinds.js

45 lines
1.6 KiB
JavaScript
Raw Normal View History

2020-03-24 20:22:37 +01:00
/* -----------
KEYBINDINGS
----------- */
//> defmod is "command" on OS X and "ctrl" elsewhere
//Advanced Example: 'defmod-k j' -> For this to fire you have to first press both ctrl and k, and then j.
var keybinds = {
// 'key(s)' : 'function',
'defmod-shift-z' : 'clearWhiteboard',
'defmod-z' : 'undoStep',
'defmod-x' : 'setTool_recSelect',
'defmod-m' : 'setTool_mouse',
'defmod-p' : 'setTool_pen',
'defmod-l' : 'setTool_line',
'defmod-r' : 'setTool_rect',
'defmod-c' : 'setTool_circle',
2020-03-26 21:23:32 +01:00
'defmod-shift-f' : 'toggleLineRecCircle',
2020-03-27 16:55:48 +01:00
'defmod-shift-x' : 'togglePenEraser',
2020-03-26 21:23:32 +01:00
'defmod-shift-r' : 'toggleMainColors',
2020-03-24 20:22:37 +01:00
'defmod-a' : 'setTool_text',
'defmod-e' : 'setTool_eraser',
'defmod-up' : 'thickness_bigger',
'defmod-down' : 'thickness_smaller',
2020-03-26 21:23:32 +01:00
'defmod-shift-c' : 'openColorPicker',
2020-03-27 16:55:48 +01:00
'defmod-shift-1' : 'setDrawColorBlack',
'defmod-shift-2' : 'setDrawColorBlue',
'defmod-shift-3' : 'setDrawColorGreen',
'defmod-shift-4' : 'setDrawColorYellow',
'defmod-shift-5' : 'setDrawColorRed',
'defmod-s' : 'saveWhiteboardAsImage',
'defmod-shift-k' : 'saveWhiteboardAsJson',
'defmod-shift-i' : 'uploadWhiteboardToWebDav',
2020-03-26 21:23:32 +01:00
'defmod-shift-j' : 'uploadJsonToWhiteboard',
'defmod-shift-s' : 'shareWhiteboard',
2020-03-24 20:22:37 +01:00
'tab' : 'hideShowControls',
'up' : 'moveDraggableUp',
'down' : 'moveDraggableDown',
'left' : 'moveDraggableLeft',
'right' : 'moveDraggableRight',
'defmod-enter' : 'dropDraggable',
2020-03-26 21:50:09 +01:00
'shift-enter' : 'addToBackground',
2020-03-24 20:22:37 +01:00
'escape' : 'cancelAllActions',
'del' : 'deleteSelection'
}