bluetech/kmscon — comment on commit dcb6a76e92f3b4d99e1f39a3eaa25e073bd656b4
File: src/input.h line 47
By dvdhrm:

Awesome! Thanks for writing this so fast. I'd love to pull it but very few things first:

* Did you check the X11 copyright? I think it's BSD-like so add it to all files where you copied source verbatim (see src/vt.c for an example) and also add it to COPYING. Make sure it's formatted the same everywhere.
* Is there a reason why you include the X11 headers in input.h? This means we need to add X11 gcc flags to all tests including input.h. Why not adding the includes to the input.c input-xkb.c files? I want the API to be independent of X11 (which it is) and hence also remove the X11 headers.
* I'd prefer merging input-private.h with input.h. We develop an application, no library, so we do not hide internal symbols. I prefer hiding them when possible, however, we shouldn't force it. See console.h for an example. The buffer object is used only in the console subsystem, still it is exported as we have muliple source files. Use proper prefixes (kmscon_) though.

Feel free to use fixup-commits. You don't need to rebase everything. I'd like to merge it to have it in my tree. There are several small things I'd like to get fixed (mostly cleanup like `a & b` instead of `a&b`) I will add inline comments to your commits. However, they are not urgent so you may omit them for now.

Regarding your other comments:

* I am ok with UCS-4 output. I will adjust the emulator to accept UCS4 and it will handle dead-keys and combining marks if required. Your UCS-4 output is actually pretty nice. I would not have expected it ;)
* I won't add shortcut support now. I was just noticing that we might need this later and should keep it in mind.

Regarding the alternatives: Wayland uses libxkbcommon and they also work on getting rid of the X-dependencies inside libxkbcommon. Therefore, I think this is the way to go. The kernel kbd interface is awful. It's very limited. I'd prefer libxkbcommon.
However, I'd like to have libxkbcommon be used only inside input-*.c files. I don't want it inside other parts of the library so we should remove it from the header. This allows us to replace libxkbcommon if we need to (I do not intend this but who knows...) and this also limits the huge dependencies to one or two source files. Maybe Kristian Hogsberg eventually rewrites libxkbcommon to work without xproto etc and then we'd only have to adjust the input-*.c files.

I currently work on a new test: test_terminal. This will hook together the output-compositor, the console subsystem, the VT handling and the new virtual terminal emulator VTE (still a dummy). It doesn't do much, yet, but I will use it to develop the VTE subsystem. I'd like to add your input subsystem to it to have direct input.

Cheers
David