undo caps lock ctrl swap

Forum rules
Before you post please read how to get help
Post Reply
g33zr
Level 1
Level 1
Posts: 16
Joined: Sun Oct 16, 2016 3:45 pm
Location: State of Confusion

undo caps lock ctrl swap

Post by g33zr » Fri Nov 30, 2018 11:49 am

I'm running Mint 19 on a System76 Sable PC. I swapped caps lock and ctrl using the bash script setxkbmap -option ctrl:swapcaps

However after using this setup for a while, I decided to go back the original configuration, but have been unsuccessful. Is there a script to reverse or remove this option?
Desktop PC: System76 Sable, Linux Mint 19, Cinnamon
Laptop: System76 Pangolin, Linux MInt 19, Cinnamon
Media Center PC: iMac, Linux Mint 19, Cinnamon

rene
Level 8
Level 8
Posts: 2351
Joined: Sun Mar 27, 2016 6:58 pm

Re: undo caps lock ctrl swap

Post by rene » Fri Nov 30, 2018 5:51 pm

g33zr wrote:
Fri Nov 30, 2018 11:49 am
I swapped caps lock and ctrl using the bash script setxkbmap -option ctrl:swapcaps
That's not a script (let alone a bash script) but a simple, direct command; moreover one the effects of are gone at logout/reboot. If they are not for you that means you did in fact add that command to some script --- possibly ~/.xprofile or ~/.profile --- and removing it from there will then undo things.

If you just never logout or reboot: setxkbmap -option resets all options to default (I do believe that in order to just undo ctrl:swapcaps you need to do either that or trawl through your actual keyboard layout in order to correctly undo a specific option).

g33zr
Level 1
Level 1
Posts: 16
Joined: Sun Oct 16, 2016 3:45 pm
Location: State of Confusion

Re: undo caps lock ctrl swap

Post by g33zr » Fri Nov 30, 2018 9:51 pm

Many thanks, Rene. My bad. I mistakenly thought the command was a bash script because I saw it referred to as a bash script elsewhere and it was in my bash history file after I ran it.

Your solution was a simple one and it worked. Again, thanks. :D
Desktop PC: System76 Sable, Linux Mint 19, Cinnamon
Laptop: System76 Pangolin, Linux MInt 19, Cinnamon
Media Center PC: iMac, Linux Mint 19, Cinnamon

Post Reply

Return to “Scripts & Bash”