---
name: "SDL_Keymod"
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_Keymod"
---

# SDL\_Keymod(3type)

Valid key modifiers (possibly OR'd together).

## NAME

SDL\_Keymod - Valid key modifiers (possibly OR'd together).

## HEADER FILE

Defined in SDL3/SDL\_keycode.h

## SYNOPSIS

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

**typedef Uint16 SDL\_Keymod;** **#define SDL\_KMOD\_NONE   0x0000u /\*\*\< no modifier is applicable. \*/** **#define SDL\_KMOD\_LSHIFT 0x0001u /\*\*\< the left Shift key is down. \*/** **#define SDL\_KMOD\_RSHIFT 0x0002u /\*\*\< the right Shift key is down. \*/** **#define SDL\_KMOD\_LEVEL5 0x0004u /\*\*\< the Level 5 Shift key is down. \*/** **#define SDL\_KMOD\_LCTRL  0x0040u /\*\*\< the left Ctrl (Control) key is down. \*/** **#define SDL\_KMOD\_RCTRL  0x0080u /\*\*\< the right Ctrl (Control) key is down. \*/** **#define SDL\_KMOD\_LALT   0x0100u /\*\*\< the left Alt key is down. \*/** **#define SDL\_KMOD\_RALT   0x0200u /\*\*\< the right Alt key is down. \*/** **#define SDL\_KMOD\_LGUI   0x0400u /\*\*\< the left GUI key (often the Windows key) is down. \*/** **#define SDL\_KMOD\_RGUI   0x0800u /\*\*\< the right GUI key (often the Windows key) is down. \*/** **#define SDL\_KMOD\_NUM    0x1000u /\*\*\< the Num Lock key (may be located on an extended keypad) is down. \*/** **#define SDL\_KMOD\_CAPS   0x2000u /\*\*\< the Caps Lock key is down. \*/** **#define SDL\_KMOD\_MODE   0x4000u /\*\*\< the !AltGr key is down. \*/** **#define SDL\_KMOD\_SCROLL 0x8000u /\*\*\< the Scroll Lock key is down. \*/** **#define SDL\_KMOD\_CTRL   (SDL\_KMOD\_LCTRL \| SDL\_KMOD\_RCTRL)   /\*\*\< Any Ctrl key is down. \*/** **#define SDL\_KMOD\_SHIFT  (SDL\_KMOD\_LSHIFT \| SDL\_KMOD\_RSHIFT) /\*\*\< Any Shift key is down. \*/** **#define SDL\_KMOD\_ALT    (SDL\_KMOD\_LALT \| SDL\_KMOD\_RALT)     /\*\*\< Any Alt key is down. \*/** **#define SDL\_KMOD\_GUI    (SDL\_KMOD\_LGUI \| SDL\_KMOD\_RGUI)     /\*\*\< Any GUI key is down. \*/** **#endif /\* SDL\_keycode\_h\_ \*/**

## AVAILABILITY

This datatype is available since SDL 3.2.0.
