Why xorg loses correct keyboard scancodes?

Yuri yuri at rawbw.com
Sat Jan 26 13:21:28 PST 2013


My keyboard has 3 extra buttons.
When pressed/released they produce these scancodes (all hexadecimals, 
all extended with e0 scancodes):
e0 11 e0 91
e0 12 e0 92
e0 5f e0 df
I got the above values using DTrace looking at what the driver of 
keyboard returns in kernel.

However, 'xev' shows that their scancodes are 145 146 146 (decimal). 
(145=0x91 146=0x92)
So xorg doesn't distinguish between the last two buttons.

Where the scancodes 145 and 156 come from?
How exactly the keyboard scancodes are translated into the user-level codes?

~/.Xmodmap allows to modify scancodes, but still there is no distinction 
between the last 2 buttons.

Yuri


More information about the xorg-devel mailing list