Some OSes (I know at least Linux does) support what's called "two-shift caps lock": if you hit both shifts, together, you get caps-locks. If you hit only one (on either side), you get a normal shift key.
This frees up the CapsLock-the-key for whatever you want, and you get to keep CapsLock-the-function. (And, you don't have to "move" it, such as in the "Swap CapsLock and Control" schemes: you get to have normal Control, CapsLock key for whatever you want, and the capslock functionality.)
I mapped my CapsLock key to "Level3 shift" at home, and mapped various interesting characters into the homerow, and space. I figured "_" is a word separator, and space bar is for separating words, so Level3+Space = "_". Level3 + the home row is stuff like ()[]{}; things that are normally way out.
Not sure how good the layout is, since I'm still trying to get used to it, and old habits die really hard. I was heavily inspired by the Neo keyboard layout[1].
Thanks for your reply. After reading it, I went out searching on how to enable "two-shift caps lock", because I sometimes need the caps lock (in Brazil almost all government related documents demand caps for items such as your name, etc.), but I also need a good compose key. I've been long using the caps lock key as the compose key, but the lack of an alternative caps lock did annoy me at times. Thanks to you, now I have the solution that perfectly fits my personal needs!
Am I the only one who actually uses caps-lock for its intended purpose on a regular basis? I use it pretty much any time I have to type more than two capital letters in a row, which is frequently when I'm programming.
Do you program in SQL? (I've just pressed Shift and released it after I typed SQL, hey)
Using Caps Lock for its intended purpose means that it's another mode that you need mental resources to keep track of.
Historical aside that's not related to your comment: early Soviet computers modeled after IBM PC had Latin key, that basically worked like Shift, but it changed layout from Cyrillic to Latin and vice versa. This idea died after MS Windows, that didn't (and still doesn't? I don't know) have this option, took over the market.
There is an option in pgAdmin to automatically capitalize keywords. Last I checked though it capitalizes them only in pgAdmin - the actual .sql file is lowercase.
When I do SQL, it's usually SQL over psql over SSH-to-database-server. And it's uncommon enough to not warrant any time investment into how to get psql syntax-highlighted.
I use caps lock for exactly what its intended purpose is: I use it as a control key, just like it was on the original IBM PC keyboard.
Just remap ctrl to caps lock and you're set.
As for switching languages, Apple puts that in a fine place by default. It's open-apple and spacebar. Just enough effort to remind you what you're doing with no awkward carpal tunnel key combinations.
I mean, if you want to get historical, the position currently occupied by the Caps Lock was Shift Lock on typewriters, which did the same thing as Caps lock currently does except it affected all keys, not just letters.
I've run into a few other people who do so, but I find that I type few enough capital letters that attempting to use an alternate, modal means of doing so (that behaves similar to the shift key but without affecting symbols) just slows me down, even when I want to write a CONSTANT_LIKE_THIS. I find it easy to type a long string of text with the shift key held down.
Consider that typing the above constant with caps-lock would still involve pressing and releasing the shift key twice to type the underscores. I'm sure I could teach my fingers to type it that way automatically, but I find it much easier to have a single way of typing a capital letter rather than two.
I use the caps lock key as an easier-to-hit Super key, which makes it easier to use all the window manager shortcuts that use the Super modifier.
I have also mapped the capslock key to super, but FWIW I've had a lot less trouble hitting the actual super key ever since I started using my ring finger for it (I used to use, and see most people using either pinky or palm, both of which require moving the hand quite a bit).
Like many others I didn't originally learn typing in a structured manner. It used to be that I only ever used the left shift key. This works adequately, but means that when holding shift the finger positions for the left hand change. In short, it's a bad habit that hampers accuracy and speed, and may increase the risk of RSI.
A couple of years back I made a concerted effort to learn the dvorak layout and have since become a fairly proficient touch-typist. Consequently, when I use a shift key I always use the hand on the opposite side to the one hitting the letter. My coordination is now good enough that I can type a sequence of capitals quickly and accurately using just the shift keys -- alternating to each side as required -- but that would be silly. I don't even think about using Caps Lock, now, it's just part of my muscle memory for when I type a sequence of capitals.
I suspect that most people who don't see the use of Caps Lock always use just one of the shift keys and hold it down when typing a sequence of capitals.
I know some people who use capslock instead of shift for producing even isolated capital letters, the idea being that hitting two keys in rapid succession, even if it means one more keystroke, could be easier than timing the hold and release of the shift key. The world's fastest typist apparently also uses the same technique:
I have a (journalist) friend who did this, but only because they didn't properly understand the shift key - she thought it only was used to access the alternate symbols on the number keys.
My wife does this and it drove me insane when I first noticed. I think she avoids typing in front of me now :)
The toggle-vs-coordination of keystrokes actually makes a fair bit of sense though; its not like we type that many capital letters in an average sentence. For a password which might have a handful of caps, though, it slows you down.
I don't have my Mac in front of me, but you can do this using Seil[1] and Karabiner[2]. From recollection, you disable caps-link in OS X settings, use Seil to map caps-lock to control, and then use Karabiner to map tapped-ctrl to escape. Sounds a bit hackish, but it works very well.
You can also do the same thing on Linux using xcape[3]
Well, the idea is that you're using emacs for your code, and then you jump over to your mail client (all the emacs mail clients don't really work for me), and hit a key to switch over to russian, or whatever.
Oh, you mean hitting j and k in sequence, not an actual chord.
Is there a way to make it trigger when pressing both keys at the same time? I'd rather not have a letter sequence that can kick me out of insert mode, especially when I'm pasting into my terminal.
No; there's absolutely no way for vim (terminal vim at least, but gvim inherits lots of terminal quirks) to see a chord like that.
But, never fear -- if you paste while in paste mode (:h 'paste or :h 'pastetoggle) imaps, iabbrs, etc. do not get activated. If you paste when not in paste mode then things tend to get messed up anyway and those are probably the least of your worries.
Or paste using the clipboard -- "+p in normal mode, or <c-r>+ in insert mode. (The other clipboard is in the asterisk register, but HN keeps eating the character)
I mapped caps lock to ctrl on Windows and to command on MacOS. Using the system wide default shortcuts feels much easier this way, because caps lock is on the same middle row where my fingers usually rest.
Speaking of multilinguals - note that Swiss people actually need capslock to type things like 'Ö' because if you press SHIFT + 'ö' then you get 'é' on a Swiss layout (well, I guess you could type '¨' first and then 'O', that also assembles to 'Ö'). Gotta accomodate for both German and French. Just a bit of trivia you might not have known.
I use Caps Lock as an extra general-purpose function key (F20), which I can then bind as I please depending on the application.
Mapping it as an extra modifier seems a tad unergonomic. Ideally, each modifier key should be located on either side of the keyboard, so that you can always engage it with the opposite hand. To that end, I also remap the Menu key on my MS Natural Keyboard[1] to act as a second Super modifier.
Furthermore, since I'm multilingual and need an AltGr modifier on both sides as well, I map the combo Ctrl+Super to act as AltGr. See my US+International XKB keymap[2] should you happen to want a similar setup on Linux.
Caps_Lock should be mapped to Control_L so you can type it in the home row with less stress to the hand/fingers. (no twisting)
Additionally, one of the better changes I made years ago was mapping redundant/useless modifiers to the bucky bits[1] in my ~/.Xmodmap.
Phys Key | New Modifier Mapping
-----------------------------------
CapsLock | Control
Alt_L | Meta
Alt_R | Alt (mod4)
Win_L | Super (mod3)
Win_R | Hyper (mod5)
To my surprise, quite a few programs support the higher modifier bits.
Or you could use the edge of your left palm to hit CTRL. This reduces strain and is much faster.
It's the way I could use Emacs to write my thesis and only wonder about those stories of RSI. On Mac and Linux, I have CTRL-Number set to switch workspaces.
I actually think you can take it a step further. I have my caps lock mapped to esc on single press and as opt + control when held but I also use something I call sticky keys that allow me to keep my hands on the keyboard and on the home row at all times.
As an "academic" touch typer, I use Caps Lock as intended (for typing more than 2 all-caps letters in a row), however since I need that much less frequently than Ctrl, I swap Ctrl and Caps Lock on every computer that I call home. As far as switching between 3 keyboard layouts (dvp, Armenian, Russian), I map that to Option+Command+Space, but now that I think about it there's probably a better combination to be found.
I mapped caps lock to left click and then used eviacam to control the mouse pointer with my face. No more keyboard<->mouse back and forth. Works great!
Well this is just magic. I had set it up to Ctrl+Space since I speak Spanish, English and learning Japanese. I am not fluent enough in Japanese yet, but it becomes a burden when trying to write a website in Spanish.
You can just do this instead in Ubuntu: Text Entry Settings => click on "Switch to the next source using" => Caps Lock
This frees up the CapsLock-the-key for whatever you want, and you get to keep CapsLock-the-function. (And, you don't have to "move" it, such as in the "Swap CapsLock and Control" schemes: you get to have normal Control, CapsLock key for whatever you want, and the capslock functionality.)
I mapped my CapsLock key to "Level3 shift" at home, and mapped various interesting characters into the homerow, and space. I figured "_" is a word separator, and space bar is for separating words, so Level3+Space = "_". Level3 + the home row is stuff like ()[]{}; things that are normally way out.
Not sure how good the layout is, since I'm still trying to get used to it, and old habits die really hard. I was heavily inspired by the Neo keyboard layout[1].
[1]: http://neo-layout.org/index_en.html