Skip to content

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 ​

ParameterTypeDescription
key"Alt" | "Control" | "Meta" | "Shift"The modifier key, for example Alt or Shift.

Returns ​

DrawPredicate

The predicate.

Example ​

ts
createWand({ shouldDraw: drawWithModifier('Alt') });