@mocanvas/editor · class

InputsManager

declare class InputsManager implements EditorInputs

The editor's input state.

A class rather than an object literal so the accessors above exist without every construction site repeating them; the fields stay public and writable because the dispatch loop assigns them directly on every event, and a setter per field would buy nothing.


Methods · 20

getAccelKey(): boolean
getAltKey(): boolean
getButtons(): Set<number>
getCtrlKey(): boolean
getCurrentPagePoint(): Vec
getCurrentScreenPoint(): Vec
getIsDragging(): boolean
getIsEditing(): boolean
getIsPanning(): boolean
getIsPen(): boolean
getIsPinching(): boolean
getIsPointing(): boolean
getKeys(): Set<string>
getMetaKey(): boolean
getOriginPagePoint(): Vec
getOriginScreenPoint(): Vec
getPointerVelocity(): Vec
getPreviousPagePoint(): Vec
getPreviousScreenPoint(): Vec
getShiftKey(): boolean

Properties · 20

accelKey: boolean
altKey: boolean
buttons: Set<number>
ctrlKey: boolean
currentPagePoint: Vec
currentScreenPoint: Vec
isDragging: boolean
isEditing: boolean
isPanning: boolean
isPen: boolean
isPinching: boolean
isPointing: boolean
keys: Set<string>
metaKey: boolean
originPagePoint: Vec
originScreenPoint: Vec
pointerVelocity: Vec
previousPagePoint: Vec
previousScreenPoint: Vec
shiftKey: boolean

mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.