I added some trace printouts to the code, and found the following:  When
the left mouse button is pressed, console_key_event processes the
following byte sequence:

0x00 0x82 0x90

After the first byte, post_osi_key_event() gets called with the
arguments 126,65536.

When the left mouse button is released, console_key_event gets

0x80 0x82 0x90

After the first byte, post_osi_key_event() get called with the arguments
254,65536.

If I use the right mouse button instead, the sequences to
console_key_event becomes 0x00 0x82 0x91 for the press, and 0x80 0x82
0x91 for the release.  The calls to post_osi_key_event() are identical.

So it seems that the problem here is caused by the press and release of
rawkey "0".  0 is KEY_RESERVED, and I don't know either why it is
generated or why it maps to "Up", but simply adding

          if(!(events[i]&0x7f)) continue;

first inside the for loop in console_key_event() actually makes the
problem go away.  Although I very much suspect that this should be
handled in the same way as rawkey 0x7f, where two more bytes are
processed directly.

-- 
USB mouse in console (fullscreen) mode generates keyboard events
https://launchpad.net/bugs/71287

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to