Function: assignGesture()
assignGesture(
gestures,action,gesture):GestureSettings
Defined in: src/lib/utils/gestures/index.ts:76
Give an action a gesture. If another action had it, that action takes this action's old gesture instead (the two swap).
Parameters
gestures
action
"undo" | "redo" | "copy" | "paste"
gesture
"tap2" | "tap3" | "swipeLeft3" | "swipeRight3" | "swipeUp3" | "swipeDown3" | "swipeOut3" | "swipeIn3" | "off"
Returns
Example
assignGesture(DEFAULT_GESTURES, "undo", "tap3"); // undo: "tap3", redo: "tap2"