Same, which is why I switched. But in order to force you to do it right it helps to rebind the original ctrl key to something else, in order to kill the old habit. I found that after about a week or so it came pretty naturally.
Any way to remap whole ESC-F1-F10 on touchbar macbooks to some existing keys? BTW, is there any "glue-in" keystrip I can put over touchbar to have real keys there?
AutoHotKey might prove to be really useful here. Speaking of CapsLock I once found a script that made the CapsLock also work for the number keys as well. That was a fun one.
Instead of mapping to Escape (or Control) I prefer mapping Caps Lock to ISO Level3 Shift, also known as AltGr. That way I get a whole new type of modifier that I can use to assign custom functionality to.
For example I map AltGr+j/k/l/i to the arrow keys so that I can navigate code without taking my fingers of the home row, regardless of the editor I am in. I also have AltGr+h mapped to Backspace, AltGr+m is delete, AltGr+u/o are home/end and so on and so forth. It opens up lots of possibilties.
Apart from the label, AltGr is identical to right hand Alt. The difference is all in software. For example, if you tell your computer you have a UK keyboard it will treat right hand Alt as AltGr.
At the USB HID level, AltGr is merely the right Alt key; the interpretation is just host software.
If a keyboard physically has two keys labelled ‘Alt’ and two labelled ‘AltGr’, then at the protocol level both ‘Alt’s are (indistinguishably) USB LeftAlt and both ‘AltGr’s are USB RightAlt.
(Mac keyboards' ‘Option’ is the label for USB Alt and acts like Windows' AltGr.)
German Keyboard. Yes, there is an AltGr key on my keyboard but I map that one to Control actually...
In fact I swap my Alt and Control keys, and don't use AltGr for its original intent at all, because using AltGr+7/8/9/0 on the German keyboard to type {[]} is horrible. I use an english layout (which I modified with my AltGr+j/k/l/i thing and a bunch of other tweaks) instead.
Mapping caps lock to escape is nice, but IMO the really useful move is to map caps lock to BOTH escape and control. I use it (via Karabiner Elements on OS X), and it's great:
Caps lock pressed AND released in isolation within 250ms is escape.
Caps lock pressed in conjunction with another key is control.
The way it seems to do it is to trigger key events on key_up rather than key_down, meaning "escape" is triggered when you release caps lock, not when you press it. This can feel a little strange in some edge cases, but in normal usage, I don't notice it at all.
This has essentially saved my MacBook Pro touchbar as a dev machine, since I absolutely loathe the touchbar escape key, but didn't want to lose caps lock as control.
Does anyone know if there is a way to do this (make Caps Lock behave as both Escape and Control depending on if any other key is combined with it) on Linux?
As the project README "Alternatives" section[0] notes, as well as others in this thread, remapping caps lock to alternate key codes with OS-X and X-Windows is straightforward with tools supplied with those windowing systems. C2[1] has a nice listing of options as well.
I use a TECK and have the right spacebar mapped to RCtrl and the LCtrl (which is physically where you would expect Caps Lock to be on a regular kbd) and LAlt switched. This gives me a Ctrl on a finger I don't usually use for typing and is extremely comfortable.
The first thing I always do when I install a new OS is remap caps lock to the Windows key, because my IBM Model M was made before the Windows key was a thing.
This program should be pretty useful to avoid having to fuck around with the registry (on windows) or xinput (on linux)
30 comments
[ 1.7 ms ] story [ 48.9 ms ] threadBut, neat to see how it's done!
For example I map AltGr+j/k/l/i to the arrow keys so that I can navigate code without taking my fingers of the home row, regardless of the editor I am in. I also have AltGr+h mapped to Backspace, AltGr+m is delete, AltGr+u/o are home/end and so on and so forth. It opens up lots of possibilties.
If a keyboard physically has two keys labelled ‘Alt’ and two labelled ‘AltGr’, then at the protocol level both ‘Alt’s are (indistinguishably) USB LeftAlt and both ‘AltGr’s are USB RightAlt.
(Mac keyboards' ‘Option’ is the label for USB Alt and acts like Windows' AltGr.)
In fact I swap my Alt and Control keys, and don't use AltGr for its original intent at all, because using AltGr+7/8/9/0 on the German keyboard to type {[]} is horrible. I use an english layout (which I modified with my AltGr+j/k/l/i thing and a bunch of other tweaks) instead.
Caps lock pressed AND released in isolation within 250ms is escape.
Caps lock pressed in conjunction with another key is control.
The way it seems to do it is to trigger key events on key_up rather than key_down, meaning "escape" is triggered when you release caps lock, not when you press it. This can feel a little strange in some edge cases, but in normal usage, I don't notice it at all.
This has essentially saved my MacBook Pro touchbar as a dev machine, since I absolutely loathe the touchbar escape key, but didn't want to lose caps lock as control.
0 - https://github.com/susam/uncap#alternatives
1 - http://wiki.c2.com/?RemapCapsLock
It has the spacebar split with an enter key in the middle.
This program should be pretty useful to avoid having to fuck around with the registry (on windows) or xinput (on linux)
Or within emacs?