# Building SDL3 for getting input with KMSDRM display

**URL:** <https://discourse.libsdl.org/t/building-sdl3-for-getting-input-with-kmsdrm-display/62294>\
**Category:** SDL Development\
**Created:** [September 5, 2025, 11:22am UTC](https://discourse.libsdl.org/t/building-sdl3-for-getting-input-with-kmsdrm-display/62294 "2025-09-05T11:22:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![illwieckz](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/illwieckz/32/5935_2.png) [@illwieckz](https://discourse.libsdl.org/u/illwieckz)\
**Post date:** [September 5, 2025, 11:22am UTC](https://discourse.libsdl.org/t/building-sdl3-for-getting-input-with-kmsdrm-display/62294/1 "2025-09-05T11:22:20Z")

</div>

While working on the port of the game [Unvanquished](https://unvanquished.net) from SDL2 to SDL3 I toyed with the KMSDRM display, and yeah the game renders without any X11 or Wayland running, that’s very cool. But then I don’t get any input.

I verified my user is in the `input` group. I also tried adding read and write permissions to everyone on `/dev/input/event*` and also tried to run the game engine as root, just to be sure it’s not a matter of missing permission. I never got any input working.

So I guess I likely missed to enable something when building SDL3. Am I right? If yes, what that could be?

---

<div class="post-metadata">

**Author:** ![illwieckz](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/illwieckz/32/5935_2.png) [@illwieckz](https://discourse.libsdl.org/u/illwieckz)\
**Post date:** [September 5, 2025, 11:35am UTC](https://discourse.libsdl.org/t/building-sdl3-for-getting-input-with-kmsdrm-display/62294/2 "2025-09-05T11:35:11Z")

</div>

I’m currently building and running SDL 3.2.20, I just noticed SDL 3.2.22 was released some days ago, so I’ll try that as well.

_Edit:_ Same with 3.2.22.

---

<div class="post-metadata">

**Author:** ![illwieckz](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/illwieckz/32/5935_2.png) [@illwieckz](https://discourse.libsdl.org/u/illwieckz)\
**Post date:** [September 16, 2025, 12:20am UTC](https://discourse.libsdl.org/t/building-sdl3-for-getting-input-with-kmsdrm-display/62294/3 "2025-09-16T00:20:41Z")

</div>

Also, maybe my problem isn’t about building SDL3 correctly, as I’m not finding any option I would have forgotten to turn on.  
If by any luck SDL3 is built correctly, is there something I actually need to do in game for keyboard/mouse input to work when rendering on KMSDRM?  
Also, maybe there is a library I need?

---

<div class="post-metadata">

**Author:** ![illwieckz](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/illwieckz/32/5935_2.png) [@illwieckz](https://discourse.libsdl.org/u/illwieckz)\
**Post date:** [September 16, 2025, 12:44am UTC](https://discourse.libsdl.org/t/building-sdl3-for-getting-input-with-kmsdrm-display/62294/4 "2025-09-16T00:44:42Z")

</div>

Here is output of `libinput list-devices`:

```auto
$ libinput list-devices
Device: vc4-hdmi
Kernel: /dev/input/event0
Group: 1
Seat: seat0, default
Capabilities: keyboard pointer 
Tap-to-click: n/a
Tap-and-drag: n/a
Tap drag lock: n/a
Left-handed: disabled
Nat.scrolling: disabled
Middle emulation: n/a
Calibration: n/a
Scroll methods: *button
Click methods: none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles: flat *adaptive
Rotation: n/a

Device: Lenovo ThinkPad Compact USB Keyboard with TrackPoint
Kernel: /dev/input/event2
Group: 2
Seat: seat0, default
Capabilities: keyboard pointer 
Tap-to-click: n/a
Tap-and-drag: n/a
Tap drag lock: n/a
Left-handed: disabled
Nat.scrolling: disabled
Middle emulation: n/a
Calibration: n/a
Scroll methods: none
Click methods: none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles: n/a
Rotation: n/a

Device: Lenovo ThinkPad Compact USB Keyboard with TrackPoint Mouse
Kernel: /dev/input/event3
Group: 2
Seat: seat0, default
Capabilities: pointer 
Tap-to-click: n/a
Tap-and-drag: n/a
Tap drag lock: n/a
Left-handed: disabled
Nat.scrolling: disabled
Middle emulation: disabled
Calibration: n/a
Scroll methods: *button
Click methods: none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles: flat *adaptive
Rotation: n/a

Device: Lenovo ThinkPad Compact USB Keyboard with TrackPoint Consumer Control
Kernel: /dev/input/event4
Group: 2
Seat: seat0, default
Capabilities: keyboard pointer 
Tap-to-click: n/a
Tap-and-drag: n/a
Tap drag lock: n/a
Left-handed: disabled
Nat.scrolling: disabled
Middle emulation: n/a
Calibration: n/a
Scroll methods: none
Click methods: none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles: n/a
Rotation: n/a

Device: Lenovo ThinkPad Compact USB Keyboard with TrackPoint
Kernel: /dev/input/event5
Group: 2
Seat: seat0, default
Capabilities: pointer 
Tap-to-click: n/a
Tap-and-drag: n/a
Tap drag lock: n/a
Left-handed: disabled
Nat.scrolling: disabled
Middle emulation: n/a
Calibration: n/a
Scroll methods: none
Click methods: none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles: n/a
Rotation: n/a

Device: Lenovo ThinkPad Compact USB Keyboard with TrackPoint
Kernel: /dev/input/event6
Group: 2
Seat: seat0, default
Capabilities: pointer 
Tap-to-click: n/a
Tap-and-drag: n/a
Tap drag lock: n/a
Left-handed: disabled
Nat.scrolling: disabled
Middle emulation: n/a
Calibration: n/a
Scroll methods: none
Click methods: none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles: n/a
Rotation: n/a

Device: Lenovo ThinkPad Compact USB Keyboard with TrackPoint
Kernel: /dev/input/event7
Group: 2
Seat: seat0, default
Capabilities: pointer 
Tap-to-click: n/a
Tap-and-drag: n/a
Tap drag lock: n/a
Left-handed: disabled
Nat.scrolling: disabled
Middle emulation: n/a
Calibration: n/a
Scroll methods: none
Click methods: none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles: n/a
Rotation: n/a

```

Can my problem comes from the fact there is an unused input devices listed first?

---

<div class="post-metadata">

**Author:** ![illwieckz](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/illwieckz/32/5935_2.png) [@illwieckz](https://discourse.libsdl.org/u/illwieckz)\
**Post date:** [September 16, 2025, 12:51am UTC](https://discourse.libsdl.org/t/building-sdl3-for-getting-input-with-kmsdrm-display/62294/5 "2025-09-16T00:51:45Z")

</div>

I noticed that `evtest /dev/input/event2` reports events for the keyboard and `evtest /dev/input/event3` reports events for the mouse, so the inputs are actually working, but not in the SDL application.

---

<div class="post-metadata">

**Author:** ![GoldenChild](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/g/dc4da7/32.png) [@GoldenChild](https://discourse.libsdl.org/u/GoldenChild)\
**Post date:** [January 18, 2026, 2:36pm UTC](https://discourse.libsdl.org/t/building-sdl3-for-getting-input-with-kmsdrm-display/62294/6 "2026-01-18T14:36:03Z")

</div>

Do you have to run the configuration tool to configure it to use SDL\_INPUT\_LINUXEV?

libsdl2\_2.30.0+dfsg.orig/SDL2-2.30.0/src/video/kmsdrm/SDL\_kmsdrmevents.c

#ifdef SDL\_INPUT\_LINUXEV  
#include “../../core/linux/SDL\_evdev.h”  
#elif defined SDL\_INPUT\_WSCONS  
#include “../../core/openbsd/SDL\_wscons.h”  
#endif

void KMSDRM\_PumpEvents(\_THIS)  
{  
#ifdef SDL\_INPUT\_LINUXEV  
SDL\_EVDEV\_Poll();  
#elif defined SDL\_INPUT\_WSCONS  
SDL\_WSCONS\_PumpEvents();  
#endif  
}
