You are not logged in.
Hello there,
Does anybody know the trick to use Caps Lock as another Escape key? It’s quite handy for vi.
Thanks,
Phil
Last edited by MekkaGodzilla (2011-07-05 14:57:27)
Offline
Hi Phil,
this would be a task for xmodmap. You can use 'xev' in terminal to find out the code of Caps Lock. (keycode 66). Then make a copy of .Xmodmap for your user only:
xmodmap -pke > .Xmodmap
Edit this file with an editor of your choice (vi)
You can now change the line
66 = Caps_Lock NoSymbol Caps_Lock
to
66 = Escape NoSymbol Caps_Lock
In this case you could have the real Caps Lock function if you press Alt + Caps Lock.
Save the file, and run
xmodmap .Xmodmap
at startup. Control if you did everything right with xev.
Sweaty lads picking up the soap | I love the new "Ignore user" button
Offline
Hi,
Thanks for the tutorial.
For some reason Caps Lock now works as an Escape key but kept ITS ORIGINAL FUNCTION AS WELL.
What to do?
Offline
maybe
66 = Escape Escape Escape
Sweaty lads picking up the soap | I love the new "Ignore user" button
Offline
Same thing unfortunately…
But I found a way to kill the caps lock function when setting my keyboard layout in my autostart.sh file :
setxkbmap fr bepo -option ctrl:nocaps &
Replace fr bepo with your layout of choice of course.
So problem solved
Offline
in case somebody cares:
add
clear Lock
as very first line in .Xmodmap, at least here it works anyway, solved is solved
Sweaty lads picking up the soap | I love the new "Ignore user" button
Offline
If I use "clear Lock", will bringing caps lock back be as easy as removing that line and restarting? Or do I have to somehow add Lock back in?
Offline
in case someone comes looking for an answer: in /etc/default/keyboard change XKBOPTIONS="" to XKBOPTIONS="caps:swapescape" ...save and reboot
credit where credit is due: http://forums.debian.net/viewtopic.php?f=5&t=82079
Offline
Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat