You are not logged in.

#1 2020-01-08 07:23:54

CooKiECruNChEr43
Member
Registered: 2015-10-17
Posts: 72

[SOLVED] Problem switching the ESC and the Caps Lock key

I want to permanently switch the ESC and Caps Lock key on my keyboard.
I created the file ~/.Xmodmap with the following content:

!Swap Caps_Lock with Escape
remove Lock = Caps_Lock
keysym Caps_Lock = Escape
keysym Escape = Caps_Lock
add Lock = Caps_Lock

After giving the command xmodprobe ~/.Xmodmap in my terminal, it creates the desired effect: the keys are switched.

There is just one problem: it isn't permanent.
To achieve that, I created the file ~/.xinitrc with the following content:

xmodmap /home/porter34/.Xmodmap

Problem is that it doesn't work.
Does anyone here switched the ESC and the Caps Lock keys here? And how did you do it?

Last edited by CooKiECruNChEr43 (2020-01-28 08:02:54)

Offline

#2 2020-01-08 09:40:29

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 1,991
Website

Re: [SOLVED] Problem switching the ESC and the Caps Lock key

Try ~/.xprofile instead of ~/.xinitrc (untested)
https://bbs.archlinux.org/viewtopic.php … 4#p1543214

How about

setxkbmap -option caps:swapescape

https://askubuntu.com/questions/363346/ … ck-and-esc

Last edited by brontosaurusrex (2020-01-08 11:23:44)

Offline

#3 2020-01-09 04:56:57

ohnonot
...again
Registered: 2015-09-29
Posts: 4,305
Website

Re: [SOLVED] Problem switching the ESC and the Caps Lock key

CooKiECruNChEr43 wrote:

There is just one problem: it isn't permanent.
To achieve that, I created the file ~/.xinitrc with the following content:

xmodmap /home/porter34/.Xmodmap

Problem is that it doesn't work.

add that line to ~/.config/openbox/autostart instead.

Offline

#4 2020-01-09 20:39:36

CooKiECruNChEr43
Member
Registered: 2015-10-17
Posts: 72

Re: [SOLVED] Problem switching the ESC and the Caps Lock key

It has to wait. I have to work extra shifts. I will let you know.

Offline

#5 2020-01-28 08:02:24

CooKiECruNChEr43
Member
Registered: 2015-10-17
Posts: 72

Re: [SOLVED] Problem switching the ESC and the Caps Lock key

I found it. The answer is really simple: go to ~/.config/openbox/autostart and then look for the comment ## Disable capslock.
Uncomment the next line and replace it with setxkbmap -option caps:escape
Reboot and then you have made the switch permanently.

Thank you again for your time and your anwers.

Offline

Board footer

Powered by FluxBB