Function: drawWithModifier()
ts
function drawWithModifier(key): DrawPredicate;Defined in: core/input.ts:39
Creates a predicate that starts a stroke only while the user holds a modifier key.
Parameters
| Parameter | Type | Description |
|---|---|---|
key | "Alt" | "Control" | "Meta" | "Shift" | The modifier key, for example Alt or Shift. |
Returns
The predicate.
Example
ts
createWand({ shouldDraw: drawWithModifier('Alt') });