On Fri Jun 5 06:45:31 2026 +0000, Rémi Bernon wrote:
Sorry I actually went to see where this input-event-codes.h include came from and I can't find any previous of the patches introducing it? Is it something you added? I'm not completely sure that introducing a Wine-private header with the definitions duplicated is a good idea when the header is supposed to come from the platform. I'm not too afraid of the values changing but it still doesn't seem right. If some platform doesn't have it, which should not be a very common situation, I think we could perhaps hardcode for instance `KEY_KPDOT`, but leave the rest behind a #ifdef with a FIXME? Gitlab probably doesn't make this as easy as it should be... From an older commit message, when I had the conditional `#include`:
This adds a dependency on linux/input.h or dev/evdev/input.h, on Linux
and FreeBSD respectively. It also includes FreeBSD's
input-event-codes.h as of the time of writing, for use where no system
header is found.
The latter was to make Gitlab's macOS CI happy. I don't know that we care a whole lot for winex11 to work on macOS (actually, why is it being built in the first place? Just to have an extra check?) The FreeBSD header seems to be an older version of the Linux one, with different attribution and license. The `#define`s we use match between the two, the Linux one has a few additional ones. I can't imagine the existing values changing in the future.
If some platform doesn't have it, which should not be a very common situation, I think we could perhaps hardcode for instance `KEY_KPDOT`, but leave the rest behind a #ifdef with a FIXME?
Like skipping the whole switch if some (arbitrarily picked) `#define` is missing? I can do that, but I'm not sure I like it a ton. What about reintroducing the system `#include`s, leaving my tiny header only for the fallback case, AND printing a `FIXME("External header not found, using hardcoded keycode values\n")` if we happen to use it? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10963#note_142286