508

LESSWRONG
LW

507
Practical
Frontpage

81

Remap your caps lock key

by bilalchughtai
15th Dec 2024
1 min read
21

81

Practical
Frontpage

81

Remap your caps lock key
16Dagon
5Aransentin
2Eva Lu
2MichaelDickens
4Adam Zerner
3joseph_c
3Neel Nanda
2martinkunev
2core_admiral
3lsusr
3MichaelDickens
2Yair Halberstadt
2Yiar
2Defective Altruism
2Seth Herd
2Vale
1martinkunev
1Pretentious Penguin
1Jasnah Kholin
1Josh Jacobson
1MichaelDickens
New Comment
21 comments, sorted by
top scoring
Click to highlight new comments since: Today at 7:43 PM
[-]Dagon9mo168

Go further with this.  Don't map it to a single key, use it as a modifier so other keys have more functionality.  using CL+hjkl as arrow keys is great for VI users, CL+WASD for gamers - either way you don't need to move your fingers as much.

I use and recommend https://ultimatehackingkeyboard.com/, which defaults to putting the mod key in place of caps lock (it's fully programmable, so you can do what you like.  On Windows, https://www.autohotkey.com/ is extremely flexible.

Reply1
[-]Aransentin9mo50

I worry that if I remap it to something actually useful I will commit it to muscle memory and begin to inadvertently press it when using a computer that's not my own. Depending on how often you switch computers this could be worse than the status quo.

Reply
[-]Eva Lu9mo20

I've had caps lock remapped to escape for a few years now, and I also remapped a bunch of symbol keys like parentheses to be easier to type when coding. On other people's computers it is slower for me type text with symbols or use vim, but I don't mind since all of my deeply focused work (when the mini-distraction of reaching for a difficult key is most costly) happens on my own computers.

Reply
[-]MichaelDickens9mo20

I primarily use a weird ergonomic keyboard (the Kinesis Advantage 2) with custom key bindings. But my laptop keyboard has normal key bindings, so my "normal keyboard" muscle memory still works.

Reply
[-]Adam Zerner9mo40

When I was a student at Fullstack Academy, a coding bootcamp, they had us all do this (mapping it to the control key), along with a few other changes to such settings like making the key repeat rate faster. I think I got this script from them.

Reply
[-]joseph_c15d30

For Linux users on US Keyboards, you might want to try making Caps Lock the multi key (also called the compose key). On Cinnamon this can be done by going to Keyboard > Layouts > Options... > Position of Compose key, and other desktop environments probably have similar settings.

This lets me type umlauts (ä, ü, ö), foreign currencies (£, €, ¥,), copyright/trademark (©, ™), and a bunch of other stuff. For example, "ü" is made by typing Compose, u, and " in sequence. I also added the line

<Multi_key> <backslash> : "λ"

to my ~/.XCompose file so that I can type λ efficiently; this is useful when writing Lisp code.

Reply
[-]Neel Nanda9mo30

When do you use escape?

Reply
[-]martinkunev3mo21
  • vim
  • closing stuff - window/application list menu which opens with alt+tab / command+tab; dropdown menus; popup messages in sites
Reply
[-]core_admiral9mo20

The escape remap is popular among users of vim or the vim keybindings in other editors since it's used there a lot. OP might have a different use, just noting it here for any vim user or prospective user who hasn't done it yet. 

Reply
[-]lsusr9mo30

If you use Linux, I trust you can manage on your own.

Personally, I put the line exec --no-startup-id setxkbmap -option ctrl:swapcaps in my .config/i3/config file. Of course, this only works if you're using the i3 tiling window manager. And if you unplug your keyboard you'll have to re-run the command manually.

Reply
[-]MichaelDickens9mo30

On Linux Mint with Cinnamon, you can do this in system settings by going to Keyboard -> Layouts -> Options -> Caps Lock behavior. (You can also put that line in a shell script and set the script to run at startup.)

Reply
[-]Yair Halberstadt9mo20

Chromebooks replace the caps lock key with a search key - which is functionally equivalent to the windows keys on windows. E.g. search+right goes to the end of the line.

Reply
[-]Yiar9mo20

I use ProtoTyping: https://github.com/pnutus/ProtoTyping

How it works:

Capslock as modifier, hold it to use right hand for:

ijkl like wasd where:

i : to move cursor one row up

k : one row down

j : one character left

l : one character right

————————

u : one word left,

o : one word right,

h : to go to beginning on line,

key right of L : to go to end of line.

————————

Then also use modifier with left hand at the same time as Capslock to:

s : selecting text with movement commands described above. E.g. Capslock + s + o, to select the next word.

d : deleting text with movement commands described above

————————

Examples:

E.g. Caps + d + h to delete everything to the left of the cursor on the line. If you need to delete multiple lines just: (Caps + d + i)x3, e.g. to delete three rows. (very useful in programming)

E.g. (Caps + s + u)x3, to select the 3 words to the left of the cursor, so you can then copy them e.g.

This helps you not have to move your hand to the mouse or to the arrow keys as much. Your hands stays in the right position for touch typing (fast typing) where index fingers rest on f and j. Just release caps for a bit to write, and quickly move around holding down caps.

You can use it in any app, not just code editors.

Reply
[-]Defective Altruism9mo21

The backspace key is also a pretty inconvenient reach. I have my capslock key remapped to backspace and it's wonderful.

Reply
[-]Seth Herd9mo20

Absolutely.

My caps lock has long been Control. I use ErgoEmacs for easy use of editing commands like delete/select word forward, delete/select word back, up line, up par, etc.

These are laid out systematically in ErgoEmacs, so are easy to learn and remember.

Only tangentially related:

for more fun and speed, learn to use the trackpad with your thumb(s) while your fingers stay in home position.

Use a wrist rest so your arms aren't tensed holding your hands in place.

All of these are independent. For the love of Pete remap your caps lock key to a modifier if you haven't. MacOS encourages this by putting it in system settings.

Reply
[-]Vale9mo20

Personally, I've had my Caps Lock key bound to Escape for quite a while (I'd suggest a few years now?). It has been lovely and fits perfectly with my keyboard-driven workflow. Pairs great with Colemak-DH, which is my layout of choice.

I haven't found myself ever missing the Caps Lock key's original functionality, and my blank laptop keycaps mean I can have it bound without mental annoyance.

Reply
[-]martinkunev3mo10

When was the last time you (intentionally) used your caps lock key?

 

yesterday

I may be the only one :)

I'd rather remap my right shift, which keyboard makers for some reason tend to make huge.

Reply
[-]Pretentious Penguin8mo10

If you're on macOS and still want caps lock to be accessible for the rare occasions when you want it, you can use Karabiner-Elements to swap the caps lock key and the escape key.

Reply
[-]Jasnah Kholin9mo10

When was the last time you (intentionally) used your caps lock key?"
today. and yesterday. and the day before that. I... can't say that about escape. i used that when i tried to close window in computer game that stuck? i can't think about other examples easily.


 

Reply
[-]Josh Jacobson9mo10

I went with https://hyperkey.app/

Reply
[-]MichaelDickens9mo10

I use a Kinesis Advantage keyboard with the keys rebound to look like this (apologies for my poor graphic design skills):

https://i.imgur.com/Mv9FI7a.png

  • Caps Lock is rebound to Backspace and Backspace is rebound to Shift.
  • Right Shift is rebound to Ctrl + Alt + Super, which I use as a command prefix for window manager commands.
  • "custom macro" uses the keyboard's built-in macro feature to send a sequence of four keypresses (Alt-G Ctrl-`), which I use as a prefix for some Emacs commands.
  • By default, the keyboard has two backslash (\) keys. I use the OS keyboard software to rebind the second one to "–" (unshifted) and "—" (shifted), which for me are the most useful characters that aren't on a standard US keyboard.
Reply
Moderation Log
More from bilalchughtai
View more
Curated and popular this week
21Comments

When was the last time you (intentionally) used your caps lock key?

No, seriously. 

 

Here is a typical US-layout qwerty (mac) keyboard. Notice:

  1. Caps lock is conveniently located only one key away from A, which is where your left pinky should rest on the home row by default.
  2. Caps lock is absolutely massive.
  3. How far various other keys you might want use often are from the home row.

 

Remap your caps lock key.

I have mine mapped to escape. 

Modifier keys such as control or command are also good options (you could then map control/command to escape).

 

How do I do this you ask? 

  • On Mac, system settings > keyboard > keyboard shortcuts > modifier keys.
  • On Windows, Microsoft PowerToys' Keyboard Manager is one solution.
  • If you use Linux, I trust you can manage on your own.

 

Thanks to Rudolf for introducing me to this idea.