EVDEV KeyCode 330


I’m reporting this, pursuant to this message:

INFO: The key you just pressed is not recognized by SDL. To help get this fixed, please report this to the SDL forums/mailing list https://discourse.libsdl.org/ EVDEV KeyCode 330

I’m getting the above message when touching on an eGalax TouchScreen with libsdl controlling the screen, on a Raspberry Pi B, running:

$ uname -a
Linux nas-pi 4.14.79+ #1159 Sun Nov 4 17:28:08 GMT 2018 armv6l GNU/Linux

This is the output of evtest, for the same touchscreen event:

$ evtest
No device specified, trying to scan all of /dev/input/event*
Not running as root, no devices may be available.
Available devices:
/dev/input/event0: Microsoft Microsoft Nano Transceiver 1.1
/dev/input/event1: Microsoft Microsoft Nano Transceiver 1.1
/dev/input/event2: eGalax Inc. USB TouchController
/dev/input/event3: Microsoft Microsoft Nano Transceiver 1.1
/dev/input/event4: USB USB Keykoard
/dev/input/event5: USB USB Keykoard
Select the device event number [0-5]: 2
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0xeef product 0x1 version 0x100
Input device name: “eGalax Inc. USB TouchController”
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event code 330 (BTN_TOUCH)
Event type 3 (EV_ABS)
Event code 0 (ABS_X)
Value 1071
Min 0
Max 2047
Event code 1 (ABS_Y)
Value 771
Min 0
Max 2047
Testing … (interrupt to exit)
Event: time 1548236197.537625, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1548236197.537625, type 3 (EV_ABS), code 0 (ABS_X), value 1204
Event: time 1548236197.537625, type 3 (EV_ABS), code 1 (ABS_Y), value 459
Event: time 1548236197.537625, -------------- SYN_REPORT ------------
Event: time 1548236197.573607, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 1548236197.573607, -------------- SYN_REPORT ------------

Also, while the pointer works fine with X and the touchscreen, as shown above with the EV_ABS events, it doesn’t appear at all on screen (and therefore cannot be seen moving) when using the touchscreen with libsdl.

libsdl is employed through undroidwish, a TCL “Batteries Included” environment that runs on many platforms, including Android and Raspbery Pi. The Android version of undroidwish, called AndroWish, is also based on libsdl and works fine.

I hope the above help debug this problem.


This was fixed in revision control recently (but is not included in the SDL 2.0.9 release). It’ll be in 2.0.10. Sorry!


I just discovered this problem and we are working on an implementation for a customer which uses this device.
We have to finish it for an exhibit on March, so we cannot wait.
Is it possible to have a patch ??

Many thanks icculus




Many many thanks !!!


Good to know.