xubuntu 14.04 keyboard layout uk gb
I have an answer that works for me. I have just found this post: https://bugs.launchpad.net/ubuntu/+source/ibus/+bug/1284635
That suggests to me ibus is problematic, so I uninstalled it:
sudo apt-get remove ibus
Then rebooted and everything is back to normal and working properly.
This happened to me after a recent update. To resolve it I went to system settings -> language support ->keyboard input method = none. Logged out and in and it's back to a UK keyboard.