Xkb keyboard events in qemu

I have a quite complex xkb config that I want to use instead of hardware keyboard events in a virtual machine (non linux) in qemu. How do I do that?

From reading Qemu documentation, I am not sure it is feasible — one of the problems would be that Qemu needs to emulate some hardware events, and a typical XKB setup has more logical keys than any realistic hardware keyboard.

What is the end goal? To remap your keyboard and use that remapping in the VM? Could you explain why doesn’t that just work?

Why remap keyboard via xkb instead of using more futureproof evdev+uinput?

I’m not aware of that and had to do some research. Thanks.