You are not logged in.

#1 2013-08-14 06:42:34

darkfeline
Member
Registered: 2012-02-14
Posts: 94

[Solved] xmodmap swapping CapsLock and Ctrl sometimes doesn't work

I've used xmodmap and the snippet in

man xmodmap

to swap my capslock and ctrl keys, and it works fine, but it seems like sometimes, hitting the caps lock key (now mapped to ctrl) sometimes "slips through" xmodmap and reverts back to being caps lock.  Spamming the key a few times or waiting a second makes it go back to being ctrl.  It's annoying and I have no idea where the problem could be.  Does anyone have any idea where I can start looking?

Last edited by darkfeline (2013-08-14 20:33:53)

Offline

#2 2013-08-14 07:04:28

ball
Member
From: Germany
Registered: 2011-12-23
Posts: 164

Re: [Solved] xmodmap swapping CapsLock and Ctrl sometimes doesn't work

I have no clue but you could try

setxkbmap -option ctrl:nocaps

as another possibility.

Offline

#3 2013-08-14 07:08:41

darkfeline
Member
Registered: 2012-02-14
Posts: 94

Re: [Solved] xmodmap swapping CapsLock and Ctrl sometimes doesn't work

Would you happen to know which package setxkbdmap is in?  I don't seem to have it on my machine.

EDIT: Never mind, thought it was setxkbdmap with the d.  I'll try it and see if it works better.

Last edited by darkfeline (2013-08-14 07:09:30)

Offline

#4 2013-08-14 07:15:21

darkfeline
Member
Registered: 2012-02-14
Posts: 94

Re: [Solved] xmodmap swapping CapsLock and Ctrl sometimes doesn't work

For some reason, setxkbmap doesn't work for me, so that's a dead end, I guess.

Offline

#5 2013-08-14 20:33:36

darkfeline
Member
Registered: 2012-02-14
Posts: 94

Re: [Solved] xmodmap swapping CapsLock and Ctrl sometimes doesn't work

I used the following xorg.conf snippet on the Emacs wiki:

Section "InputClass"
    Identifier            "Keyboard Setting"
    MatchIsKeyboard       "yes"
    Option                "XkbOptions" "ctrl:swapcaps"
EndSection

It seems to be more stable than the xmodmap one.  So far I haven't run into the same problem, which is a good sign. 

Another problem I ran into is that with this setup, the capslock/ctrl switch resets when I switch to a virtual console and back.  Doing it again fixes it.  Also a little annoying, but at least it's predictable instead of random.

Offline

Board footer

Powered by FluxBB