---
name: "SDL_MouseButtonFlags"
section: "3type"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_MouseButtonFlags"
---

# SDL\_MouseButtonFlags(3type)

A bitmask of pressed mouse buttons, as reported by SDL\_GetMouseState , etc.

## NAME

SDL\_MouseButtonFlags - A bitmask of pressed mouse buttons, as reported by  **SDL\_GetMouseState** , etc.

## HEADER FILE

Defined in SDL3/SDL\_mouse.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**typedef Uint32 SDL\_MouseButtonFlags;** **#define SDL\_BUTTON\_LEFT     1** **#define SDL\_BUTTON\_MIDDLE   2** **#define SDL\_BUTTON\_RIGHT    3** **#define SDL\_BUTTON\_X1       4** **#define SDL\_BUTTON\_X2       5** **#define SDL\_BUTTON\_MASK(X)  (1u \<\< ((X)-1))** **#define SDL\_BUTTON\_LMASK    SDL\_BUTTON\_MASK(SDL\_BUTTON\_LEFT)** **#define SDL\_BUTTON\_MMASK    SDL\_BUTTON\_MASK(SDL\_BUTTON\_MIDDLE)** **#define SDL\_BUTTON\_RMASK    SDL\_BUTTON\_MASK(SDL\_BUTTON\_RIGHT)** **#define SDL\_BUTTON\_X1MASK   SDL\_BUTTON\_MASK(SDL\_BUTTON\_X1)** **#define SDL\_BUTTON\_X2MASK   SDL\_BUTTON\_MASK(SDL\_BUTTON\_X2)**

## DESCRIPTION

• Button 1: Left mouse button

• Button 2: Middle mouse button

• Button 3: Right mouse button

• Button 4: Side mouse button 1

• Button 5: Side mouse button 2

## AVAILABILITY

This datatype is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_GetMouseState**(3)](/SDL_GetMouseState/3.md), **•**(3), [**SDL\_GetGlobalMouseState**(3)](/SDL_GetGlobalMouseState/3.md), **•**(3), [**SDL\_GetRelativeMouseState**(3)](/SDL_GetRelativeMouseState/3.md)
