At the console as root
dpkg-reconfigure xserver-xfree86 and pick the proper keyboard layout from the list provided. If this does not work then can you post the file /etc/X11/XF86Config-4 or the revelant sections see below and tell us the keyboard type you are using.
Code:
Section "InputDevice"
Identifier "Keyboard0"
Driver "keyboard"
Option "CoreKeyboard"
Option "XkbRules" "xfree86"
Option "XkbModel" "pc101"
Option "XkbLayout" "us"
Option "XkbOptions" "crtl:nocaps"
EndSection
Section "ServerLayout"
# Identifier "XFree86 Configured"
Identifier "DualHead"
Screen 0 "Screen0" 0 0
Screen 1 "Screen1" LeftOf "Screen0"
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
# Option "Xinerama" "on"
EndSection