This looks like simple fixes but I'm curious, do you know if it would be possible to build some KBDTABLES similarly to how it's done in winewayland? Like:
1) is macOS providing key scancodes that could be mapped back to hardware scancodes, and
2) ways to inspect the host layout mapping for things like dead key combinations and such?
Though 2) / dead key support isn't implemented yet in winewayland / win32u, but libxkbcommon recently introduced functions to inspect the mapping without having to try every combination.