feat(drivers): Add libinput/xkb driver#5486
Conversation
| bool "Enable full keyboard support via XKB" | ||
| depends on LV_USE_LIBINPUT | ||
| default n | ||
|
|
There was a problem hiding this comment.
I'm unsure if and how to add LV_LIBINPUT_XKB_KEY_MAP. Similar macros like LV_CALENDAR_DEFAULT_DAY_NAMES are also absent here. Is this intentional?
There was a problem hiding this comment.
As Kconfig cannot support complex types, some options are just omitted.
bbf18c6 to
33eaa54
Compare
|
Just to note, this code has been shipping in the unl0kr project in postmarketOS for several months now, and it's known to work well on all the wonderful and weird touchscreen devices it's been tested on so far. |
XuNeo
left a comment
There was a problem hiding this comment.
There's warning about LV_LIBINPUT_XKB because it's only defined when LV_USE_LIBINPUT is enabled.
33eaa54 to
199bb47
Compare
Ah thanks, I missed that. Should be fixed now. |
|
Similar issue has happened before. I think the easiest solution is in lv_conf_template.h #if LV_USE_LIBINPUT
#define LV_LIBINPUT_BSD 0
/*Full keyboard support*/
#define LV_LIBINPUT_XKB 0
#if LV_LIBINPUT_XKB
/*"setxkbmap -query" can help find the right values for your keyboard*/
#define LV_LIBINPUT_XKB_KEY_MAP { .rules = NULL, .model = "pc101", .layout = "us", .variant = NULL, .options = NULL }
#endif
#else
#define LV_LIBINPUT_XKB 0
#endif |
kisvegabor
left a comment
There was a problem hiding this comment.
Amazing!
Could you add some documentation too?
I wonder if we can at least compile the Linux related drivers in our CI. To do this we just need to
- install the required libs here
- add the libs to the test CMakeList
- Enable these driver in
lv_test_conf_full.h
| bool "Enable full keyboard support via XKB" | ||
| depends on LV_USE_LIBINPUT | ||
| default n | ||
|
|
There was a problem hiding this comment.
As Kconfig cannot support complex types, some options are just omitted.
Yes, have added some.
Good idea. I've made these changes. It looks like libxkbcommon cannot be found though. I tried stealing from https://github.com/WebPlatformForEmbedded/WPEBackend-mesa/blob/master/CMakeLists.txt#L16 but for some reason this doesn't work. 🤔 |
|
I couldn't find anything useful for it in Google either. 🙁 Let's disable |
5731324 to
00cdf89
Compare
00cdf89 to
2d396f1
Compare
|
It seems this did the trick! Well done! |
Yes, I stole it from lv_drivers. 🙈 😅 |
|
Cool, thanks for all! |
Description of the feature or fix
This adds the libinput / xkb driver from lv_drivers together with the buffering / multi-touch extensions from lvgl/lv_drivers#280. It's quite a lot of code, sadly. I've tried to massage the interfaces into the style used for other drivers in LVGL without having to rewrite everything from scratch.
Notes
lv_conf_template.hrun lv_conf_internal_gen.py and update Kconfig.scripts/code-format.py(astyle needs to be installed) and follow the Code Conventions