Problem with my keymap

How to set my system to uk keymap? I set the uk keymap in /etc/rc.conf. It works well in commandline but when I switch to xfce4, my keymap layout become us. How to fix it?
 
I try the handbook, edit the x11-input.fdi, and xorg.conf, try use kbdmap and setxkbmap, but still cannot change it.

In the handbook, use
Code:
Option "AutoAddDevices" "false"
I try it too. But after I added it into xorg.conf my system cannot enter the xfce.
 
Don't just blindly throw the options shown into your config. Read the descriptions. The paragraph before that option says "To restore the old behavior..."
 
To solve the keyboard map problem, you should let x11 ignore autodetected devices function. To ignore it, please add following code into xorg.conf:

Code:
Option "AutoAddDevices" "false"

Like this:

Code:
Section "ServerLayout"
	Identifier     "X.org Configured"
	Screen      0  "Screen0" 0 0
	InputDevice    "Mouse0" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"
	Option         "AutoAddDevices" "False" #<----- ignore autodetected devices
EndSection

Then you can setup keymap manually in xorg.conf. For me, I am using UK keymap, so I add following code into Section "InputDevice":

Code:
Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"
	Option	"XkbModel"	"pc105"  #<----your keyboard model
	Option  "XkbLayout"	"gb"     #<----your keyboard map
EndSection

You can find available keymap and model in /usr/local/share/X11/xkb/rules/base.lst.
 
HanBing said:
I use hal at begin, but it don't work for me.

Code:
hald_enable="YES"
dbus_enable="YES"
keymap="uk.iso"

That's not enough; see the X11 Configuration chapter and search for x11-input.fdi.
 
Back
Top