You are not logged in.

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

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

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?

Offline

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

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

Re: 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)

Online

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

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

Re: 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: 71

Re: 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

Board footer

Powered by FluxBB