Applications Windows
Réduire la table des matières
Développer la table des matières
EN
Ce contenu n’est pas disponible dans votre langue. Voici la version anglaise.

buttons property

Indicates which pointer device buttons are being pressed, expressed as a bitmask.

Document Object Model (DOM) Level 3 Events Specification, Section 5.2.3

 

Syntax

JavaScript

p = object.buttons

 

Property values

Type: Number

0

No buttons are pressed

1

2

  • Right mouse button press, or
  • Pen contact with barrel button pressed, or(PointerEvent only)

4

Middle mouse button press

8

X1 (back) mouse button press (PointerEvent only)

16

X2 (forward) mouse button press (PointerEvent only)

32

Pen contact with eraser button pressed (PointerEvent only)

Standards information

See also

DragEvent
MouseEvent
MouseWheelEvent
WheelEvent
button

 

 

Afficher:
© 2017 Microsoft