Xephyr occasionally gets more than a little confused about the current keyboard settings (caps lock get forced on... etc). One or more of the following sometimes restore normality:
- xkbset nullify lock
- setxkbmap gb
- restart the window manager as a last resort