This is only triggered by a keyboard driver, which (at start) registers <256 keycodes. It is also impossible to change the interval of core valid keycodes. I have hacked a (probably unacceptable) workaround, by updating ConnectionInfo (from DIX). A part of my work is a new keyboard driver (medved ), and if this workaround is not accepted (nor easily corrected), i'll just force registering of all 256 keycodes.
table of XKB actions and keysyms. (i provide comments in the patch)
If number of XKB types changes (by calling apropriate functions), the XKB-unaware applications (eg. xterm) don't notice it! In other words (client side) synthesized core X events were not sufficiently informative.