I'm finally familiar enough with vim to start coding with it.
I have an excellent (standard American) Model M keyboard, but the problem is that the Escape key is a little out of reach, which interrupts me constantly.
There is the obvious Ctrl-[ but it seems my head doesn't work that way.
I could remap the keys in .vimrc, but then I'd like to remap the keys in the vi-mode of my bash prompt also.
I figure that the best thing for me is to swap the Escape and CAPS LOCK keys. Not just in X (if I use X, I use XFCE) but in the console also.
What is the best way to do this? I've come across a number of solutions on the internet, but I guess the best place to ask about this is here.
What I've tried so far:
* dumpkeys to backup.kmap, edit this file to swap keycode 1 and 58, save as blabla.kmap, and loadkeys blabla.kmap. No change in keyboard behaviour.
* edit /etc/default/keyboard so that it contains XKBOPTIONS="caps:swapescape". Then run dpkg-reconfigure console-setup. No change either.
Thanks.
I'm running Debian Wheezy.
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
How to swap the Caps Lock and Escape keys? [SOLVED]
Re: How to swap the Caps Lock and Escape keys?
Thanks.Quantum wrote:See if this helps.
But no cigar.
Have tried on a Wheezy and also a Lenny box. There's no /etc/console directory and I tried to locate boottime.kmap.gz but it didn't come up with any result.
Never kill a customer.
Re: How to swap the Caps Lock and Escape keys?
Oh? I have /etc/console with boottime.kmap.gz in it. Current Debian Testing.
Re: How to swap the Caps Lock and Escape keys?
This is a little weird. I checked on a couple of machines, but I don't have this directory or that keymap file on any of them.Quantum wrote:Oh? I have /etc/console with boottime.kmap.gz in it. Current Debian Testing.
Never kill a customer.
Re: How to swap the Caps Lock and Escape keys?
The directory comes in console-common package. I'd think console-data has something to do with this as well. Anyways, I have these installed and the following inside /etc/default/keyboard:endived wrote:There's no /etc/console directory and I tried to locate boottime.kmap.gz but it didn't come up with any result.
Code: Select all
XKBMODEL="pc105"
XKBLAYOUT="fi"
XKBVARIANT=""
XKBOPTIONS="ctrl:nocaps"
Q: Why is the Eunux kernel so bloated?
A: It was made in the image of its founder.
A: It was made in the image of its founder.
Re: How to swap the Caps Lock and Escape keys?
I installed console-common and console-data and instead of "ctrl:nocaps" I went for "caps:swapescape".debil wrote:The directory comes in console-common package. I'd think console-data has something to do with this as well. Anyways, I have these installed and the following inside /etc/default/keyboard:endived wrote:There's no /etc/console directory and I tried to locate boottime.kmap.gz but it didn't come up with any result.I have a separate setxkbmap line inside my ~/.xinitrc as well. Works as expected. Swapping capslock with esc should (sic) work too, in theory at least.Code: Select all
XKBMODEL="pc105" XKBLAYOUT="fi" XKBVARIANT="" XKBOPTIONS="ctrl:nocaps"
Now it does indeed work.
Thanks for your help.
Never kill a customer.