Skip to content

Commit

Permalink
refactor(renderer-app): add hot keys to whiteboard (#419)
Browse files Browse the repository at this point in the history
  • Loading branch information
hyrious committed Mar 19, 2021
1 parent 3b0637e commit 39f73dc
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion desktop/renderer-app/src/stores/WhiteboardStore.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {makeAutoObservable, observable} from "mobx";
import {createPlugins, DeviceType, Room, RoomPhase, RoomState, ViewMode, WhiteWebSdk} from "white-web-sdk";
import {createPlugins, DefaultHotKeys, DeviceType, Room, RoomPhase, RoomState, ViewMode, WhiteWebSdk} from "white-web-sdk";
import {videoPlugin} from "@netless/white-video-plugin";
import {audioPlugin} from "@netless/white-audio-plugin";
import {CursorTool} from "@netless/cursor-tool";
Expand Down Expand Up @@ -110,6 +110,18 @@ export class WhiteboardStore {
userPayload: { userId: globalStore.userUUID, cursorName },
floatBar: true,
isWritable: this.isWritable,
hotKeys: {
...DefaultHotKeys,
changeToSelector: "s",
changeToLaserPointer: "l",
changeToPencil: "p",
changeToRectangle: "r",
changeToEllipse: "c",
changeToEraser: "e",
changeToStraight: "t",
changeToArrow: "a",
changeToHand: "h",
}
},
{
onPhaseChanged: phase => {
Expand Down

0 comments on commit 39f73dc

Please sign in to comment.