To reproduce, create a non-core pointer/keyboard pair and assign your mouse/keyboard to it:
Note that your mouse will have a new cursor independent from the other one (which may remain visible).
Then click in any Qt application and try typing using modifier keys (eg, Shift). Despite pressing Shift, everything will be lowercase (because Qt is checking the core keyboard's Shift state, not the state for your "test keyboard"). Similarly, if you assign a keymapping to your keyboard device (xkbcomp with the -d option), it will be ignored and the core keyboard's mapping used instead.
To restore your system back to normal: