Use caps lock as a language switch(marinin.xyz) |
Use caps lock as a language switch(marinin.xyz) |
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].
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.
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.
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.
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.
http://seanwrona.com/typing.php (see "typing tips" section)
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.
If pressed and released without another keypress in between, it sends ESC.
If pressed in combination with another key, it's CTRL.
I haven't found a way to do this dual mapping on OSX, so it's just CTRL there. I use AutoHotKey for this on windows.
You can also do the same thing on Linux using xcape[3]
[1]: https://pqrs.org/osx/karabiner/seil.html.en [2]: https://pqrs.org/osx/karabiner/index.html.en [3]: https://github.com/alols/xcape
However, you could bind this to lcontrol, and get the capslock light to turn on when it goes.
Also, am I the only one who at some point rebound ralt to rshift? I've stopped doing it now. I don't know what I was thinking.
So when I do emacs I use mule, which is mapped by default as C-/. It is not so bad if you remap Caps to Control, but still not one key.
:inoremap jk <esc> http://learnvimscriptthehardway.stevelosh.com/chapters/10.ht...
I even remap ESC to nop so that I won't ever forget.
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.
I got this idea from the custom layout of the HHKB keyboard: https://elitekeyboards.com/proddata/doc/hhkbp2_basic_layout1...
https://en.wikipedia.org/wiki/QWERTY#US-International
The Windows version makes more sense to me, but I'm getting used to the Mac one too.
AltGr + e = é
AltGr + p = ö
Adding Shift to the mix produces É and Ö, respectively, as one would expect.
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.
[1] https://www.microsoft.com/accessories/en-us/products/keyboar...
[2] https://gist.github.com/ucs1/fe673a3606442911dbd7d016a372646...
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.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.
Regedit HKEY_CURRENT_USER\Control Panel\Input Method\Hot Keys\Your_Language_IME
Set the key modifier to 00 and set the virtual key to the key you want caps lock is 04 iirc. https://msdn.microsoft.com/en-us/library/windows/desktop/dd3...
I think there was also a way to hack it through HKEY_CURRENT_USER\Keyboard Layout\Toggle but I'm not sure if it's used anymore.
[Here it is and how I use it.](https://github.com/nikitavoloboev/dotfiles/tree/master/karab...)
Long-time emacs use has permanently changed my left pinkie.
You can just do this instead in Ubuntu: Text Entry Settings => click on "Switch to the next source using" => Caps Lock
AutoHotkey on Windows 10:
CapsLock::#Space
+CapsLock::+#SpaceIf I miss anything, I would like it if shift + caps lock, behaved the same as shift lock.
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 really, really hate chording.