Comment 1 for bug 1809075

Gao (alapha23) wrote :

### Reproduce steps

Add `fprintf(stderr, "ps2_queue 0x%x\n", b);` to `hw/input/ps2.c` and re-build qemu.

- qemu-system-x86_64 -hda <your img> --enable-kvm -m <> -display vnc=:1
- vncviewer -Shared :5901

In guest os, find the keyboard device(very likely to be /dev/input/event0)
```
sudo evtest /dev/input/event0
```

On host OS
- vncdotool -s 127.0.0.1::5901 type AaBb
Finally,
- record what evtest has received and compared with expected key streams.

Around once out of five times, we can find keycode lost due to capslock LED.

Please do not rely on graphics mode output as there are also key loss bugs when wayland internals deal with kernel keyboard events.

A simply note on some conversion between keycode and keys. Hopefully it would come in handy in debugging:
a 0x1e 0x9e
b 0x30 0xb0
c 0x2e 0xae
d 0x20 0xa0
capslock 0x3a 0xba
capslock LED 0xfa 0xfa
ret 0x1c 0x9c
leftshift 0x2a 0xaa