You are not logged in.
So I've spent the better part of an hour trying to remap my caps lock key to control. I've added a udev policy "10-keymap.fdi" in /etc/hal/fdi/policy.
<?xml version="1.0" encoding="ISO 8859-1"?>
<deviceinfo version="0.2">
<device>
<match key="info.capabilities" contains="input.keys">
<merge key="input.xkb.options" type="string">ctrl:nocaps</merge>
</match>
</device>
</deviceinfo>I restarted hal and it seems to acknowledge my new rule. lshal | grep xkb yields:
brian@brian-laptop:~$ lshal | grep xkb
input.xkb.layout = 'us' (string)
input.xkb.model = 'evdev' (string)
input.xkb.options = 'ctrl:nocaps' (string)
input.xkb.rules = 'base' (string)
input.xkb.variant = '' (string)
input.xkb.layout = 'us' (string)
input.xkb.model = 'evdev' (string)
input.xkb.options = 'ctrl:nocaps' (string)
input.xkb.rules = 'base' (string)
input.xkb.variant = '' (string)
input.xkb.layout = 'us' (string)
input.xkb.model = 'evdev' (string)
input.xkb.options = 'ctrl:nocaps' (string)
input.xkb.rules = 'base' (string)
input.xkb.variant = '' (string)
input.xkb.layout = 'us' (string)
input.xkb.model = 'evdev' (string)
input.xkb.options = 'ctrl:nocaps' (string)
input.xkb.rules = 'base' (string)
input.xkb.variant = '' (string)But when I hit the caps lock key, it still gives me caps lock, not control. xev unsurprisingly tells me the keysym I'm pressing is indeed caps lock. I know I could do this by using xmodmap but I'd like to keep my .xinitrc clean/would just like to know why this isn't working.
Last edited by iamsmrt (2010-08-02 13:53:59)
Offline
Its worth trying adding this to your xorg.conf:
Section "InputClass"
Identifier "evdev keyboard catchall"
MatchIsKeyboard "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
Option "XkbLayout" "gb"
Option "XkbOptions" "ctrl:nocaps"
EndSectionI was having this problem for a while and this worked for me. Your mileage may vary.
Offline
I know I could do this by using xmodmap but I'd like to keep my .xinitrc clean/would just like to know why this isn't working.
I use xmodmap and it's quite easy to setup. Just curious, but why exactly do you want to keep your ".xinitrc clean"?
Offline
Its worth trying adding this to your xorg.conf:
Section "InputClass" Identifier "evdev keyboard catchall" MatchIsKeyboard "on" MatchDevicePath "/dev/input/event*" Driver "evdev" Option "XkbLayout" "gb" Option "XkbOptions" "ctrl:nocaps" EndSectionI was having this problem for a while and this worked for me. Your mileage may vary.
This worked, thanks!
iamsmrt wrote:I know I could do this by using xmodmap but I'd like to keep my .xinitrc clean/would just like to know why this isn't working.
I use xmodmap and it's quite easy to setup. Just curious, but why exactly do you want to keep your ".xinitrc clean"?
My OCD more than anything ![]()
Offline
I'd say using xmodmap is much more clean than screwing around with HAL and stuff like that.
Simply add the following to ~/.xmodmaprc
remove Lock = Caps_Lock
add Control = Caps_LockAnd then add to your startup programs (~/.xinitrc)
xmodmap ~/.xmodmaprxNot sure how a bunch of XML is cleaner. This way, you don't need to restart HAL or anything when you make a change.
EDIT: Also this way, you don't even need an /etc/X11/xorg.conf
Last edited by tom5760 (2010-08-01 15:41:42)
Offline
Anntoin wrote:Its worth trying adding this to your xorg.conf:
Section "InputClass" Identifier "evdev keyboard catchall" MatchIsKeyboard "on" MatchDevicePath "/dev/input/event*" Driver "evdev" Option "XkbLayout" "gb" Option "XkbOptions" "ctrl:nocaps" EndSectionI was having this problem for a while and this worked for me. Your mileage may vary.
This worked, thanks!
Cool, I didn't know you could do that in xorg.conf.
It seems like you found the solution that you wanted. Please prepend "[SOLVED]" at the beginning of the thread title. Thanks! That way, as people browse the forums to help people, they'll know that you already found a solution.
Offline
nixpunk wrote:iamsmrt wrote:I know I could do this by using xmodmap but I'd like to keep my .xinitrc clean/would just like to know why this isn't working.
I use xmodmap and it's quite easy to setup. Just curious, but why exactly do you want to keep your ".xinitrc clean"?
My OCD more than anything
Can't say I don't understand. ![]()
Offline