You are not logged in.

#1 2014-10-12 07:56:17

hashken
Member
Registered: 2014-08-05
Posts: 14

[SOLVED] Switching Caps Lock and Escape

I know this has been asked before, but none of the solutions proposed work for me.

I can currently think of four solutions for this:
* Using xmodmap
* Using setxbmap
* Playing around with udev
* Using DE specific setting

I would like my setting to DE agnostic and as far as possible changing only user config files, so I'm looking for a solution with one of the first two approaches. Referring to previous discussions [1], I tried the following:

* /usr/bin/setxkbmap -option "caps:swapescape"
* Setting caps lock and esc values in .xmodmap file and invoking using /usr/bin/xmodmap ~/.xmodmap

I tried all possible variations, by putting the above in .profile and .xinitrc separately. But, nothing seems to work. How do I solve this problem?

[1] https://bbs.archlinux.org/viewtopic.php?pid=1104840

Last edited by hashken (2014-10-12 13:48:35)

Offline

#2 2014-10-12 08:12:42

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Switching Caps Lock and Escape

The first approach, setxkbmap in .xinitrc, works perfectly for me. Are you sure your .xinitrc is actually read?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2014-10-12 12:22:15

hashken
Member
Registered: 2014-08-05
Posts: 14

Re: [SOLVED] Switching Caps Lock and Escape

How do I check if my .xinitrc is read? I thought it was supposed to be read by default.

Offline

#4 2014-10-12 12:42:36

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,549
Website

Re: [SOLVED] Switching Caps Lock and Escape

I also use and recommend the first method.

xinitrc is not always read - there isn't a simple way to 'check' but you should know.  How do you start X?  If you are using a DE (as indicated in the first post) many DE's come with their own display managers (DMs) and often these do not read xinitrc.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#5 2014-10-12 13:04:44

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Switching Caps Lock and Escape

Post your ~/.xinitrc.
Maybe you added the swapescape line after the 'exec' line and it's not read.

Offline

#6 2014-10-12 13:47:46

hashken
Member
Registered: 2014-08-05
Posts: 14

Re: [SOLVED] Switching Caps Lock and Escape

I was using cdm as my display manager until now and I guess it was not reading my .xinitrc. Now, I have switched to slim and can confirm that my .xinitrc is being read and Caps Lock and Esc are being swapped.

Thanks a lot for the help.

Offline

Board footer

Powered by FluxBB