Why xorg loses correct keyboard scancodes?

Peter Hutterer peter.hutterer at who-t.net
Mon Jan 28 16:15:03 PST 2013


On Sat, Jan 26, 2013 at 01:21:28PM -0800, Yuri wrote:
> 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.

what does evtest show on this device?
> 
> Where the scancodes 145 and 156 come from?
> How exactly the keyboard scancodes are translated into the user-level codes?

usually X keycodes are kernel scancode + 8.

Cheers,
   Peter

> 
> ~/.Xmodmap allows to modify scancodes, but still there is no
> distinction between the last 2 buttons.
> 
> Yuri
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
> 


More information about the xorg-devel mailing list