I was submerged by work for a bit there but have crawled out and made another attempt at fixing the Linux keyboard issue.
This time, the code correctly uses X keysym values to determine arrow key presses etc.
Can the Linux people try:
and let me know if it works for them.
Keys should type their correct character, and the cursor keys should work.