Hi,
AT (well XT) keycodes aren't that bad a choice, at least if you go for the extended mapping used by the Linux keyboard driver.
Hmm, as far I know those extended mappings are not standardized. Uses linux this just as internal representation? Or can you actually feed a linux guest with them and expect it to work? How about non-linux guests?
When using it as wire protocol guest compatibility doesn't matter that much though ...
The master mapping is from Linux keycodes to other sets: http://git.gnome.org/browse/gtk-vnc/tree/src/keymaps.csv And a tool that can then create you C arrays for mapping between arbitrary keycode sets in any direction (potentially lossy of course, depending on choice of keycode sets): http://git.gnome.org/browse/gtk-vnc/tree/src/keymap-gen.pl
Nice. cheers, Gerd