Skip to content

textmode.js / Textmodifier / mouseIsPressed

Property: mouseIsPressed

ts
readonly mouseIsPressed: boolean;

Whether a mouse button is currently held down.

This value stays true after a press begins on the canvas and returns to false when the button is released, including releases that occur outside the canvas after the interaction starts. Use it inside draw() for polling-style interactions.

Example