Skip to content

buttonHeld beta ​

Function of @v12-engine/client

ts
export declare function buttonHeld(e: PointerEvent | MouseEvent, button: number): boolean;

Whether a button (PointerEvent.button: 0 left, 1 middle, 2 right, 3 back, 4 forward) is still held, as a pointer event says (buttons). A drag that missed its button's release (let go over a menu that opened, in another window, while the browser had the mouse) ends on the next move with this, rather than going on with every move after