Maybe it's not a problem about keyboard emulation but joystick emulation.
Quick MSX-BASIC test:
If no joystick present you should see "... 0 0"
from stick(0) it vary between 0 and 8 as expected - stick(1) is always 8, and stick(2) is 0
maybe is there some way to disable joystick somehow? since it is happening on both OpenMSX and MESS, and on both Lubuntu and Crunchbang, i imagine that is some kind of misconfiguration on some Linux config file or something like?