# Problem with my keymap



## HanBing (Nov 1, 2010)

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?


----------



## wblock@ (Nov 1, 2010)

The Handbook chapter on X11 Configuration describes setting a keyboard layout.  Please, always check the Handbook first.


----------



## HanBing (Nov 1, 2010)

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 
	
	



```
Option "AutoAddDevices" "false"
```
 I try it too. But after I added it into xorg.conf my system cannot enter the xfce.


----------



## wblock@ (Nov 1, 2010)

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..."


----------



## DutchDaemon (Nov 2, 2010)

Maybe read the forum rules as well if you have a minute, HanBing?


----------



## HanBing (Nov 2, 2010)

Thanks, Now I fix this problem already.


----------



## HanBing (Nov 2, 2010)

I will read the forum rules carefully.


----------



## HanBing (Nov 13, 2010)

To solve the keyboard map problem, you should let x11 ignore autodetected devices function. To ignore it, please add following code into xorg.conf:


```
Option "AutoAddDevices" "false"
```

Like this:


```
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":


```
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.


----------



## wblock@ (Nov 13, 2010)

There's also an alternate way using hal shown in the X11 Configuration chapter of the Handbook.


----------



## HanBing (Nov 14, 2010)

I use hal at begin, but it don't work for me.


```
hald_enable="YES"
dbus_enable="YES"
keymap="uk.iso"
```


----------



## wblock@ (Nov 14, 2010)

HanBing said:
			
		

> I use hal at begin, but it don't work for me.
> 
> 
> ```
> ...



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


----------

