using the current xorg modular from Ubuntu: $ setxkbmap -layout 'fr,us' -model pc105 -option '' -option 'grp:alt s_toggle' -print xkb_keymap { xkb_keycodes { include "xfree86+aliases(azerty)" }; xkb_types { include "complete" }; xkb_compat { include "complete" }; xkb_symbols { include "pc(pc105)+fr+us:2+group(alts_toggle)" }; xkb_geometry { include "pc(pc105)" }; $ setxkbmap -layout 'fr,us' -model pc105 -option '' -option 'grp:alts_toggle' -print | xkbcomp - :0.0 Warning: Type "ONE_LEVEL" has 1 levels, but <RALT> has 2 symbols Ignoring extra symbols Warning: No symbols defined for <SYRQ> (keycode 92) Warning: No symbols defined for <BRK> (keycode 114) Warning: No symbols defined for <FK13> (keycode 118) .... X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 148 (XKEYBOARD) Minor opcode of failed request: 9 (XkbSetMap) Value in failed request: 0x16710002 Serial number of failed request: 78 Current serial number in output stream: 84 Sergey V. Udaltsov has mailed a describtion of the issue here: http://listserv.bat.ru/xkb/Message/880.html
will get some more sensible debugging information from the server as to why it's returning badvalue
Not sure if this helps or not, but I am getting the same error from the following code (trying to change a single KeySym assignment; values in XkbDescRec seem to be OK): unsigned short offset; unsigned short width; XkbDescPtr pXkbDesc; pXkbDesc = XkbGetMap(display, XkbKeySymsMask, XkbUseCoreKbd); XkbMapChangesRec ChgRec = {0}; ChgRec.changed = XkbKeySymsMask; ChgRec.first_key_sym = keycode; ChgRec.num_key_syms = 1; ChgRec.min_key_code = pXkbDesc->min_key_code; ChgRec.max_key_code = pXkbDesc->max_key_code; offset = pXkbDesc->map->key_sym_map[keycode].offset; width = pXkbDesc->map->key_sym_map[keycode].width; printf("Changing symbol {%d, %d, %d} from %d to %d\n", keycode, group, level, pXkbDesc->map->syms[offset + group * width + level], newsym); pXkbDesc->map->syms[offset + group * width + level] = newsym; if(False == XkbChangeMap(display, pXkbDesc, &ChgRec)) { printf("ERROR: failed to apply changes.\n"); ret = 1; goto quit; }
Sebastien, this looks strange. I am using ubunbu breezy and "make install" from xkeyboard-config. Look: $ setxkbmap -layout 'fr,us' -model pc105 -option '' -option 'grp:alts_toggle' -print xkb_keymap { xkb_keycodes { include "xfree86+aliases(azerty)" }; xkb_types { include "complete" }; xkb_compat { include "complete" }; xkb_symbols { include "pc(pc105)+fr+us:2+level3(ralt_switch_for_alts_toggle):1+level3(ralt_switch_for_alts_toggle):2+group(alts_toggle)" }; xkb_geometry { include "pc(pc105)" }; }; It is different from what you show me here...
That is fixed with xkeyboard-config now, closing the bug. Sergey let me know if you are interested anyway by the reply to your previous comment, but there is probably no point to debug something working now
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.