SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2009-10-09 23:18:06

KonkaNok
New Member
From: Bristol, UK
Registered: 2009-10-09
Posts: 3
Website

Swap Caps Lock and Ctrl Key

Hi, sorry to post yet another thread about key configs but I just recently installed #! and can't figure out how to swap my caps lock and ctrl buttons (i.e. swap their functions). I've read through a bunch of howto's and tried to search as thoroughly as possible but wasn't able to find anything specific.
I've tried using xmodmap (which has worked for my other key mods) and I've had a go at editing rc but to no avail.
If someone could post a short and sweet tutorial or hit me with a link that would be awesome  smile

Offline

Be excellent to each other!

#2 2009-10-10 18:09:29

KonkaNok
New Member
From: Bristol, UK
Registered: 2009-10-09
Posts: 3
Website

Re: Swap Caps Lock and Ctrl Key

OK.. so after no replies I did even more searching and found a great fix on the ubuntu forums here: http://ubuntuforums.org/showthread.php?t=736536
Needs a bit of fiddling about with xmodmap. To reiterate what's in that post:

Put the following into a text file:
!
! Swap Caps_Lock and Control_L
!
remove Lock = Caps_Lock
remove Control = Control_L
keysym Control_L = Caps_Lock
keysym Caps_Lock = Control_L
add Lock = Caps_Lock
add Control = Control_L

Save it as whatever-you-like.kmap. [In the tutorial it says to save it into /etc/ but you can just as easily put it in your home space or wherever else you want.]
In your .bashrc file (in your home dir) put:  xmodmap whatever-you-called-it.kmap
Ta-da! big_smile

The ubuntu tutorial is.. more fiddly with no apparent benefits. If you didn't put the file in your home folder make sure to specify where you put it in .bashrc,
e.g. xmodmap /in/a/folder/somewhere/whatever-you-called-it.kmap

Hope this is helpful to someone..

Offline

#3 2010-06-29 06:55:49

mt12345
Member
Registered: 2010-06-23
Posts: 13

Re: Swap Caps Lock and Ctrl Key

KonkaNok wrote:

Hope this is helpful to someone..

Indeed it is!

I was looking for a way to disable caps lock so my  ~/.nocaps.kmap file contain just one line:

remove Lock = Caps_Lock

Many thanks!

Offline

#4 2010-06-30 17:00:43

mt12345
Member
Registered: 2010-06-23
Posts: 13

Re: Swap Caps Lock and Ctrl Key

after applying updates doesn't work anymore... sad

Offline

#5 2010-12-06 01:30:43

analognoise
New Member
Registered: 2010-11-30
Posts: 2

Re: Swap Caps Lock and Ctrl Key

I've been trying to swap the ctrl and caps lock keys to make Emacs use easier.
Has anyone found a good solution yet? I tried what is on the Emacs wiki:
http://www.emacswiki.org/emacs/MovingTheCtrlKey#toc7
for Debian but it isn't working.

Offline

#6 2010-12-07 05:17:41

analognoise
New Member
Registered: 2010-11-30
Posts: 2

Re: Swap Caps Lock and Ctrl Key

Apparently the stuff posted to the Debian wiki IS working, but I (for whatever reason) had to do a restart.
My CAPS LOCK key now functions as a control, and the ctrl key functions as CAPS LOCK.

Fantastic.

I suggest the link in my above post smile:):)

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo