Multiple keyboard mapping issues

Daniel Stone daniel at
Thu Jan 25 14:08:37 PST 2007

On Fri, Jan 26, 2007 at 02:12:33AM +1030, Peter Hutterer wrote:
> I spent today trying to get multiple keyboards working.
> The vanilla xserver segfaults with evdev keyboard devices on the  
> first keypress. Can anyone confirm this?

Hmm, I use evdev, and it works okay for me.

> Keyboard mapping is weird. I got it to work with my example  
> application, typing in two windows at once.
> Evdev keyboards only have 128 keysyms, kbd devices 247.
> In theory, a MappingNotify event should inform a client about a  
> changed number of keysyms. This is fine. XRefreshKeyboardMapping()  
> hoewever doesn't change the min/max_keycode fields in the Display  
> struct, nothing else seems to either. As a result, all applications  
> get BadValue on the next GetKeyboardMapping request, due to  
> max_keycodes being wrong (still on the 255).
> Is this a bug in Xlib or where did I go wrong?

IIRC, min/max_keycode is part of the setup, and thus is immutable.

> There's also a bug in xkbUtils.c:1042 where the memcpy(dst->map- 
> >key_sym_map, ...) overwrites the later used dst->server->explicit,  
> leading to another segfault. I can't see the reason why it would  
> write over the boundaries, but then its over 15 hours looking at code  
> already. If anyone can see the problem, I'd appreciate the hint.

Urgh.  I haven't been able to work that one out either, nor have I been
able to reproduce it.  Looking at the code (yet again), I can't figure
out how we can ever overrun here.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <>

More information about the xorg mailing list