This is how I would try to fix it. I have no clue if this will work, but it's worth trying. Try pressing [ctrl]+[alt]+F1. This put you in a virtual terminal. The keyboard settings should be normal outside of X11. Then enter:
to fix your settings or edit /etc/X11/xorg.conf if you're feeling adventurous.
good luck.