Repository navigation
Replies: 1 comment
|
The fork now also handles One could also do it the fancy way: use xkbcommon and a configured layout. Dead keys will still require more. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I'm using raylib with
PLATFORM_DRMon an embedded device with a touchscreen UI, and I'm experiencing a couple of issues to due the lack of input device hotplugging. I'm aware that the topic has been discussed before in #4631 and that the request has been denied for reasons of code simplicity. However, even with a single input device (in the sense of a physical device) connected at startup, the current mechanism can fail.Current behaviour
/dev/inputis scanned once inInitEvdevInput(). Devices connected later are never read. A device whoseread()fails withENODEVis never closed or reopened.readdir()order that passes the keyboard test.Real-world cases where this breaks
Proposed changes
A working, but rudimentary, implementation based on raylib 6.0 is here:
https://github.com/maiphi/raylib/commits/6.0-drm-input-hotplug
/dev/inputforIN_CREATEandIN_ATTRIB(udev makes the node readable only after creating it)./dev, because/dev/inputonly exists if an input device is connected.read()fails withENODEVthe fd is closed and removed, and its keys are released.Everything is localized in
rcore_drm.c, no new API is needed. No methods to tell devices apart. The idea is to make DRM input handling work as smoothly as on the desktop.Note that this is still half-baked, not covering various corner cases. If you're interested, I'll put in more effort to address those.
All reactions