I'm using XFree86 4.1.0 on a self-built Linux 2.4.17 kernel.  I have a
Microsoft Natural Keyboard Pro; this keyboard has both PS/2 and USB
connectors.  The keyboard's extra row of multimedia and Internet keys
work great using PS/2 and the "microsoftpro" XkbModel.  If I switch to
USB, though, something misbehaves.  As reported by the X server,
several keys' keycodes change and no longer match up with the proper
keysyms.  For example, the "My Computer" key yields keycode 235 when
using PS/2, but keycode 111 when using USB.

(Coincidentally, keycode 111 also happens to be the keycode generated by 
the "PrintScn" key.  That means that there's no combination of xmodmap 
magic that can fix this.  Once the two keys have the same keycode, it's 
beyond fixing.)

I realize that a lot happens between the USB drivers and the X server. 
Is what I'm seeing a USB driver bug?  A more generic Linux kernel input 
layer bug?  An X server bug?

I understand that my keyboard appears as two USB interfaces: one for
the standard keys and one for these extra keys.  So at some layer in
the system these are being merged into one stream.  Who does that?  At
what point do two distinct keys ("My Computer" and "PrintScn") from
two distinct key devices map into a single numeric code (111)?  If
that's happening in the X server, then perhaps this is an X server
bug.  If that multiplexing is happening below the X server, then it
seems the bug must be down in the Linux kernel or USB drivers.

Suggestions are welcomed, as are polite instructions to report this
elsewhere if it genuinely is someone else's bug.  I have already
reported this to the <linux-usb-users> mailing list, but my inquiry
was met with complete and utter silence.  :-(

Attached below is a comparison chart showing, for each key, the code
reported by the X server when using PS/2 and USB.  (I don't know if
that's useful, but like I said, I'm not sure which software layer is
responsible for this bug.)

Thank you!
Label           PS/2    USB
-----           ----    ---
Back            234     234
Forward         233     233
Stop            232     232
Refresh         231     121     (mismatch)
Search          229     229
Favorites       230     230
Web/Home        178     130     (mismatch)
Mail            236     236
Mute            160     166     (mismatch)
- (volume)      174     165     (mismatch)
+ (volume)      176     158     (mismatch)
Play/Pause      162     159     (mismatch)
Stop            164     151     (mismatch)
Prev Track      144     164     (mismatch)
Next Track      153     162     (mismatch)
Media           237     129     (mismatch)
My Computer     235     111     (mismatch)
Calculator      161     161
Sleep           223     227     (mismatch)

Reply via email to