Skip to main content
`Ctrl`+`K`

# PetscDrawButton

Used to determine which button was pressed

## Synopsis

    typedef enum {
      PETSC_BUTTON_NONE = 0,
      PETSC_BUTTON_LEFT,
      PETSC_BUTTON_CENTER,
      PETSC_BUTTON_RIGHT,
      PETSC_BUTTON_WHEEL_UP,
      PETSC_BUTTON_WHEEL_DOWN,
      PETSC_BUTTON_LEFT_SHIFT,
      PETSC_BUTTON_CENTER_SHIFT,
      PETSC_BUTTON_RIGHT_SHIFT
    } PetscDrawButton;

## Values

- `PETSC_BUTTON_NONE` - no button was pressed

- `PETSC_BUTTON_LEFT` - the left button

- `PETSC_BUTTON_CENTER` - the center button

- `PETSC_BUTTON_RIGHT` - the right button

- `PETSC_BUTTON_WHEEL_UP` - the wheel was moved up

- `PETSC_BUTTON_WHEEL_DOWN` - the wheel was moved down

- `PETSC_BUTTON_LEFT_SHIFT` - the left button and the shift key

- `PETSC_BUTTON_CENTER_SHIFT`- the center button and the shift key

- `PETSC_BUTTON_RIGHT_SHIFT` - the right button and the shift key

## See Also

`PetscDraw`, `PetscDrawGetMouseButton()`

## Level

intermediate

## Location

include/petscdraw.h

Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages