21 ms·
A useful Caps Lock key
- lukifer 13y agoThis is a great trick, and absolutely worth doing. I have mine mapped to Hyper as well, which is tied to Slate bindings for resizing and managing windows. https://github.com/jigish/slate https://github.com/jigish/slate
- djfergus 13y agoCare to post your slate configuration file? I've just started using it and am seeking inspiration.
- craigmccaskill 13y agohttps://github.com/lunixbochs/reslate https://github.com/lunixbochs/reslate Was built by a co-worker of mine (ontop of slate). Pretty great set of defaults.
- n0nick 13y ago+1 for reslate :) I use it combined with a hyper key mapping (similar to OP) and enjoy it very much. my config file: https://github.com/n0nick/dotfiles/blob/master/slate/slate.js https://github.com/n0nick/dotfiles/blob/master/slate/slate.j...
- lukifer 13y agoMine's a little crazy. :) I'm simulating logic using tortured math to cycle through 1/6th increments left-to-right, and then splitting into vertical halves if desired. It's buggy on boundary conditions, but good enough for my purposes. http://pastebin.com/qjD8TvrE http://pastebin.com/qjD8TvrE
- wahnfrieden 13y agoKinesis user: caps lock mapped to shift (home row), left shift mapped to escape (vim).
- drifkin 13y agoI ended up doing something very similar after reading Steve Losh's article. I kept Control where it was, using Caps Lock as Escape/Hyper . The best part by far is using Caps Lock + hjkl for navigation. At work, I leave my arrow keys & numpad covered up with a mouse platform so I can keep the mouse closer. A side effect of this was feeling completely lost when using Windows in Boot Camp. I found that there's a great piece of software on Windows called "AutoHotKey" that lets me do the same hjkl navigation.
- TacticalCoder 13y agocaps lock + hjkl requires your left pinky every time you want to move the cursor. This may very well induce RSI because "using the arrow keys" is something that we tend to do all the time. I'm using the key physically at the left of the space bar (I don't like talking about the 'name' of the key because it's very keyboard-dependent) as the modifier which allows me to move the cursor. And I move the cursor using modifier+ijkl (for ijkl reproduces the inverted T arrow cluster, not unlike how gamers like to use WASD or ESDF). I do hit the modifier using my left thumb, which is a finger much stronger than the pinky (and, arguably, such a setup is less RSI inducing). Regarding covering the arrow keys and numpad with a mouse platform: many people opt for for a "TKL" (no numpad) or even 60% keyboard (no numpad, no arrow cluster) and typically those 60% keyboards have the benefit of coming with quality switches (also arguably less RSI inducing). If you want to see what others are doing, two great sites are geekhack.org and deskthority.net. FWIW I use a 60% keyboard which has CTRL at the correct place (i.e. where CAPS-LOCK is on keyboards which have a caps-lock): an HHKB Pro 2 (using the amazing Topre switches)... Which doesn't even have a CAPS-LOCK key. Note that lately there seem to be a regain in interest in alternate setups and alternate mappings: for example the "SpaceFN" layout uses the space bar as an additional modifier (when it is held down) and ijkl to move the cursor around (once again: ijkl and not vim's hjkl and a strong finger, the thumb, to press the modifier). Regarding remapping and "feeling completely lost" on other OSes: if you want to not have to remap your keyboard on Windows / OS X / Linux etc. you may want to buy a keyboard which has a programmable controller: your setup then works the way you want on any computer.
- drifkin 13y ago
- kozikow 13y agoIt may be useful to remap right shift to shift/delete in similar manner. Also look how awkwardly placed ctrl is. You can remap enter to act as ctrl if it is pressed with something (and plain old enter otherwise). I did this in my keyboard layout: https://kozikow.wordpress.com/2013/11/15/the-only-alternative-keyboard-layout-youll-ever-need-as-a-programmer/ https://kozikow.wordpress.com/2013/11/15/the-only-alternativ... .
- braydenm 13y agoCaps is a fantastic key to use for things like backspace, but if you want even more functionality, try using it with Colemak as a modifier that puts all the other common keys right on your home row: http://forum.colemak.com/viewtopic.php?id=1467 http://forum.colemak.com/viewtopic.php?id=1467
- reeses 13y agoSlap that on a Truly Ergonomic keyboard (https://www.trulyergonomic.com https://www.trulyergonomic.com) and you're living my life. Do it all at once and type 4 wpm for a month. (I have the older "international" version with a number of blank keys. I remapped the left space bar to command and the lower left dead key to hyper. Tapping either shift of course generates a paren.)
- V-2 13y agoI do use it as backspace (I got the idea from Colemak, which I didn't like that much, but I found this particular idea great). It's very convenient especially for deleting entire words (it's ctrl + backspace normally, but ctrl + capslock only requires one hand and it just feels easier).
- thedookmaster 13y agoI have Caps Lock mapped to Backspace. Makes total sense after seeing how out of the way Backspace is.
- stolksdorf 13y agoI've used Autohotkey (Windows) to remap my capslock to select the word my cursor is currently in. Essentially pressing ctrl+left, then ctrl+shift+right. I too have become so use to this that using other people's keyboards is frustrating. I've taken this a couple steps further, shift+capslock selects the current line and ctrl+capslock activates Sublime's multicursor feature.
- usea 13y agoThis won't work in everything, will it? What about if your cursor is at the beginning of a word? Not to mention that different editors stop in different places with ctrl+arrows. Many editors have a key combo for select word already. In Visual Studio it's ctrl-w.
- stolksdorf 13y agoI've been using it for about 1.5 years, and it's been mostly consistent between applications; Notepad being the only one I've noticed with odd characters it includes in the ctrl+arrow movements. I really like the approach using Autohotkey because it becomes universal on my system, so capslock can select words in chrome, IM apps, etc. I don't have to worry that the app supports that feature.
- broodbucket 13y agoI just disable its functionality and use it as an extra key for things such as push to talk. Getting in the hang of using as a replacement for delete/escape etc causes muscle memory problems when typing on someone else's keyboard, if you're only ever using your own then it's beneficial, kinda like switching from qwerty
- pak 13y agoI remapped my Caps Lock key to switch into a "Greek" mode for typing, since I frequently need to type Greek letters interspersed with English. (Anybody in STEM classes should know how awkward it is to do this normally.) If you have a Mac, you can do this with Ukelele, a free key remapping tool. You can even set up and add "dead key" modes (e.g. the way opt+E allows you to add a diacritic to the next letter typed). There are some really advanced configurations possible. Ukelele even still works on Mavericks. http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=ukelele http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=...
- StavrosK 13y agoWell, as a Greek, typing Greek isn't hard at all. Install the Greek keyboard layout (should be a few clicks in any OS) , switch to it and the letters should more or less make sense (a is α, e is ε, i is ι, etc).
- lambda 13y ago> Ukelele even still works on Mavericks. Why wouldn't it? They didn't change the entire input system in Mavericks, did they?
- andresidhil 13y agoya
- andresidhil 13y agok
- snotrockets 13y agoNot awkward, just with a little steep learning curve. The only way to type math notation (which isn't the same character set as Greek. Compare \varepsilon with \epsilon, for example: http://www.w3.org/2003/entities/2007doc/#epsilon http://www.w3.org/2003/entities/2007doc/#epsilon) is LaTeX. And for that, the only keys you really need are the dollar sign and backwards-slash.
- blazespin 13y ago"I’ve become quite used to it — to the point where using other people’s keyboards is inconvenient. " I stopped reading right there.
- voltagex_ 13y agoWhy? Even without interesting remappings, aren't you more used to your own keyboard than someone else's?
- belluchan 13y agoI learned to type in a keyboarding class in high school in the nineties. I was taught to use the caps lock automatically for instances where there are 3 or more capital letters. I cannot give that up as infrequently as it happens. That is much more inconvenient to me than making that key do something else.
- deviltry 13y agoMy Caps Lock is remapped to '=' I originaly got this idea to remap when I started playing WoW in 2006. I needed a lot of keybinds and it turned I couldn't bind 'raw' caps lock, so I had to remap to other key and = seemed like a good choice.
- mFixman 13y agoAs a Spanish speaker who's used to using English keys for programming, I found it useful to use the Caps Lock key to change keyboard layouts.
- falsedan 13y agoI prefer Scroll Lock for cycling keyboard layouts
- jes5199 13y agoI've got it mapped to Control like a standard hacker, but this reminds me that some years ago I had it mapped so that if I hit SHIFT-CAPSLOCK (which is a rather unusual thing to do, think about it), it would type... a tilde. I have no idea why I thought I wanted that.
- erichurkman 13y agoDid you have a keyboard that didn't have a tilde?
- socksy 13y agoAre you sure it was a tilde? My terminal emulator puts in tildes for various special characters (such as when I press the delete key).
- jamesjporter 13y agoUs Emacs users unfortunately have to remap it to control to retain sanity on standard keyboards :P
- chipotle_coyote 13y agoI do that by default now, too -- OS X has a few basic Emacs control keys that work in all text fields/boxes, like ^P/^N, ^A/^E, ^D, etc., and even though I rarely use Emacs itself those have become muscle memory. (I use KeyRemap4MacBook for a couple things, including mapping Caps Lock to pressing both shift keys simultaneously, so I still have it if I need it.)
- dokem 13y agoRemapping my capslock key to escape was the only way that I could finally switch to Vim. Highly Recommended.
- InclinedPlane 13y agoinoremap jj <Esc> Best .vimrc setting ever.
- scintill76 13y agoHave you compared it to CapsLock as ESC? I understand Escape is in a ridiculous position on most keyboards, but I think CapsLock makes a great mode switcher, and have been using it for a few months now. (Downside being that it can't be done in vimrc, at least not in terminal vim which I use.) The jj and jk hacks always seemed ridiculous, but maybe I'll give them a try. I think I would prefer jk for speed and fatigue reduction, or maybe even something on the left home row since I'm left-handed.
- verroq 13y agoI find jk a lot more convenient. With Capslock my pinky has to move over to the next column, where as jk just sits on the home row.
- InclinedPlane 13y agoAs you say, you can't just tweak the capslock assignment in vimrc or by issuing a command. The great thing about the jj/jk hack is that if you end up on some random system or borrowing someone else's shell for a second then all you have to do is type ":inoremap jj <Esc>" and you're back in the groove. I was a little skeptical about it at first as it seemed like a weird hack, but it's actually quite practical. The fact that you don't have to leave the home row to swap between modes is a huge efficiency boost.
- userbinator 13y agoI don't know when but very shortly after I started to use vi I learned about and used Ctrl+[, and have been doing that to this day. I still tend to use ^[ instead of Esc by instinct, even when it doesn't work in any other program.
- DomKM 13y agoGreat post but it's over a year old. Shouldn't it be labeled as such?
- jrockway 13y agoThat makes sense for news or trip reports, but what has changed about keyboards in the last year? Nothing I can think of.
- dunham 13y agoI cut my teeth on Sun keyboards and emacs, so I always remap caps lock to control.
- stevewillows 13y agoDisabling CAPS is one of the first things I do when I refresh a system. I've always wanted to find a better alternative, but as of yet, it hasn't presented itself. I've thought about mapping it to alt+tab since I use VNC quite a bit.
- dima55 13y agoDoes nobody use the Caps Lock key as a caps lock? Pretty useful for that.
- eru 13y agoLots of people have no need for locked caps.
- jrockway 13y agoBUT IT MAKES SARCASTIC COMMENTS SO EASY TO WRITE.
- paulnechifor 13y ago“Angry” languages aren't used much anymore (FORTRAN, COBOL, BASIC), so there is no need for Caps Lock.
- dima55 13y agoI guess, but do you still not have a use for it? What if you're talking to git and referring to HEAD? Or if you're #defining things in C? Or if you're writing an email and you want to emphasize a few words?
- IsTom 13y agoI hold left shift with my pinky or right shift with my thumb. Unless I do a lot of all-caps typing it's not a problem.
- tokenrove 13y agoAny reasonable text editor will have more efficient ways to capitalize things than dedicating one of the most convenient keys on the keyboard to it. I prefer M-u (by word) or C-x C-u (by region) in emacs.
- aidenn0 13y agoInteresting enough, all of the standard library for Common Lisp is in caps. However, the default reader upcases all unescaped characters. A somewhat common way of getting case sensitivity without (CONS (CAR x) (CDR y)) is to change the reader to be case-inverting (which then requires you to type in all standard-library symbols as lowercase.
- holychiz 13y agoi ran org-mode with vim so i set caps lock key to ctrl and right Cmd key to esc.
- cenhyperion 13y agoMine's mapped to escape because vim.
- FrankenPC 13y agoI can't stand the caps lock key at all. I pop them all off my keyboards.
- myhf 13y agoI just remap caps lock to act as a random modifier each time it's pressed. It seems absurd to set it up any other way.
- josegonzalez 13y agoI use caps-lock instead of shift. For example, I do "CAP-LOCK, LETTER, CAPS-LOCK" to type a capital letter. It's less efficient, yes, but it works just fine for me. Explaining this to anyone gets "you're kidding" views, but I assure you, the caps lock key is already quite useful to me.
- dragonwriter 13y agoKey sequences -- even though they may involve more strokes -- are simpler in some ways than chording, so I can see why that would be attractive.
- drifkin 13y agoIt's actually unclear whether it's less efficient or not. Sean Wrona, one of the fastest typists in various competitions, generally uses it in place of shift. He posts about it here: http://forum.colemak.com/viewtopic.php?pid=8851#p8851 http://forum.colemak.com/viewtopic.php?pid=8851#p8851
- userbinator 13y agoThe first thing to come to mind when I read the parent was Sean Wrona too... I use StickyKeys which lets me hit Shift and then a letter, which I think is even faster since you don't have to "un-shift" like you would with CapsLock.
- tokenrove 13y agoThe ergonomic considerations of what he proposes are a little terrifying to me.
- rquirk 13y agoOne of my work mates uses this technique too. I remap my caps to ctrl. Hilarity ensues whenever he tries to use my keyboard for pair programming.
- jrockway 13y agoIsn't hyper its own key, not a combination of the other modifiers? http://upload.wikimedia.org/wikipedia/commons/4/47/Space-cadet.jpg http://upload.wikimedia.org/wikipedia/commons/4/47/Space-cad... Emacs seems to think so: ELISP> (kbd "S-s-C-M-x") [176160792] ELISP> (kbd "s-C-M-x") [142606360] ELISP> (kbd "H-x") [16777336]
- drifkin 13y agoYup, it's its own key. People tend to refer to this combination of modifiers on OS X as "Hyper" because of this post by Steve Losh: http://stevelosh.com/blog/2012/10/a-modern-space-cadet/#hyper http://stevelosh.com/blog/2012/10/a-modern-space-cadet/#hype...
- jrockway 13y agoThat's annoying. How do Mac users use capitalized Greek letters as part of key combinations!?
- chipotle_coyote 13y agoIt's a horrible burden, but we've learned to make do.
- andresidhil 13y agotest
- skryl 13y agoIf you're looking for the rest of the private.xml file (HYPER + H/J/K/L) mappings... https://gist.github.com/skryl/8143550 https://gist.github.com/skryl/8143550
- septerr 13y agoI think macs make working with keyboard shortcuts very difficult for various reasons. - Command and Control are confusingly named. - They use most of the function keys for windows related things - bring all windows to front etc. - There is no key for right click like those offered by Windows keyboards to bring up context menus. - You can Command-Tab to an application but not to the individual windows of that application. You must use Command-Tilde for that. - Apps offered for mac don't have a consistent behavior for the close button. Some apps will close the window, but stay in the dock. Others will quit. - On Windows, if the first letter in the menu bar items is underlined, you can be sure you can just do Alt + that letter to open up that menu item. You could even move windows using one of the menu item options and arrow keys. My biggest issue on switching from Windows to Mac was losing all those keyboard shortcuts. On Windows I could do a whole lot more without ever touching the mouse. I know you can remap your keys etc. but then you usually end up acting all awkward anytime you have to use someone else's computer. So I want the defaults to be good instead and I think Windows got theirs better than Mac. Don't hate on me for this. I know both operating systems have their pros and cons.
- ajanuary 13y agoWindows is just as inconsistent with closing, with the added bonus of also being inconsistent with minimizing behaviour too. How do you get an app to go to the systray? Close it? Minimise it? Who knows. While I do agree Windows has a better keyboard story, most of what you describe are just differences, not worse.
- freehunter 13y agoExcel 2003 was the worst offender of inconsistent closing/minimizing behavior for me. If you had multiple workbooks open, you couldn't have one on each screen because they're tied to the main Excel window. If you tried to close a workbook using the normal X button like you were closing a single Word document, it would close every open Excel book. You had to use a smaller X below the main X to close a single book. I'm glad they finally changed that stupid behavior.
- falcolas 13y ago
- paulnechifor 13y agoWhile on the topic of useless keys, what do you think of the Menu key? I use mine for a drop down terminal (Tilda, or Yakuake before).
- philip1209 13y agoI map mine to control. I switched from using "Escape" to ctrl-c in vim, which plays nicely with this key mapping.
- gfodor 13y agoFYI you probably want to use ctrl-[, ctrl-c has some cases where the behavior isn't the same as ESC
- sirsar 13y agoIf you're on Windows, a no-hassle way to do this is with AutoHotkey. http://www.autohotkey.com/ http://www.autohotkey.com/ http://www.autohotkey.com/docs/misc/Remap.htm http://www.autohotkey.com/docs/misc/Remap.htm
- GhotiFish 13y agoCompose key! https://en.wikipedia.org/wiki/Compose_key https://en.wikipedia.org/wiki/Compose_key languages, like ruby, haskell, and go, let you use unicode characaters in the language. You can map those characters to key combinations with the compose key. It comes with a giant list of key combos for accented characters too. So it's worth enabling, then defining your own combos for symbols you'd like to add to your vernacular.
- rurounijones 13y agoThe first ruby code I find with unicode characters outside the comments gets the author a smack around the head :) Yes it is all very nice that you can do this, but if you publish some code which some poor shmuck wants to modify on his non-uber-unicoded-dev-setup you just made his life a lot worse.
- SEMW 13y agoit 'is the season to be jolly' do expect(☃ + ☀).to eq(♨) end ;)
- AlecSchueler 13y agoWho is using an editor that doesn't support Unicode?
- Danieru 13y agoThat was what I thought until my patch broke the build for a windows based dev. Granted this was C++, Ruby should fair better by having a single popular runtime.
- mineo 13y agoThe compose key is also useful outside of programming environments: I'm german but still prefer english keyboard layouts for easier access to several characters (like {}[]\ and so on) which require the use of Alt Gr on german keyboards. The compose key still allows me to use german umlauts like ä by typing <Compose>"a. I've gotten quite fast in doing that because by having compose on Capslock, I can use two fingers of my left hand to press the Shift and Capslock keys (nearly) simultaneously, one finger of my right hand to press the ' key (which, together with Shift, gives me the ") and then press a afterwards.
- userbinator 13y agoXML? For key remapping? Seriously...?
- robomartin 13y agoThere's history to support the Ctrl key being to the left of caps-lock. http://www.redgrittybrick.org/terminals/keyboards.html http://www.redgrittybrick.org/terminals/keyboards.html I guess without another key to the left a lot of people remap caps-lock to ctrl. I never got used to that for some reason. In general terms I tend to avoid remapping in order to maintain a consistent UI. the only exception to this that makes sense to me is that all of my Macs have always had their keyboards remapped to match a PC. As closely as reasonable and possible. For example, ctrl-c and ctrl-v do exactly the same thing whether I am running a Windows, Linux (GUI) or MacOS machine.
- Namrog84 13y agoI am very unoriginal, uncreative, and uninovative. Aside from browser and maybe calculator. What else would be good to hot key like the op author describes? Thanks!
- ozh 13y agoOn fr_FR mapped keyboards (AZERTY) the upper left key is a utterly useless ². I've remapped it to a backtick ` which is otherwise complicated to obtain (needs a 3 key combo). If anyone interested: http://planetozh.com/projects/azertyck/ http://planetozh.com/projects/azertyck/
- andresidhil 13y agobb
- andresidhil 13y agozxx
- daGrevis 13y agoI have been using super-caps for some time to remap Caps to be Escape or Control if pressed together with something else. https://github.com/cmatheson/super-caps https://github.com/cmatheson/super-caps I must admit, on my computer I'm super productive. My left hand isn't moving at all and my left's pinkie feels relieved because it doesn't have to bend to Control key. On other computers I'm totally screwed. As OP mentioned before, I have ruined my muscle memory.
- darkbot 13y agoCaps-Lock should of course be remapped to Control.
- twic 13y agoCaps lock is already control - CRUISE CONTROL FOR COOL.
- mattengi 13y agoIn linux, if you want to make Capslock as both ESC and Ctrl, $ setxkboption -option -option 'ctrl:nocaps' $ xcape https://github.com/alols/xcape https://github.com/alols/xcape What is good for? - Happy with vim - Happy with emacs like - readline - keybinding. C-a, C-e, C-u, C-k, C-d, C-h, C-w, C-p, C-n, C-y ... - Ctrl key is most used in any gui application. You can abandon both bottomleft Ctrl and topleft Esc.
- StavrosK 13y agoHow does that work? Pressing it alone is escape, pressing it in combination with another key is Ctrl?
- mattengi 13y agoYes
- keenerd 13y agoIf you use Emacs, I've heard great things about used xkb to remap spacebar to control, and using xcape to make control generate a space when tapped. It sounds messy but now you'll get emacs thumb instead of emacs pinky.
- gcb1 13y agosad how linux fell behind on keyboard customizations. used to be the only place where i could replace caps-esc and use altGr for accents. now windows with autokey(?) allows me to use caps as esc if pressed once, or ctrl modifier if pressed with another key. i cant find a way to do that in linux now.
- keenerd 13y agoScroll up, see kozikow's post about xcape.
- andresidhil 13y agom
- kybernetikos 13y agoReminds me of the Caps Lock Function key on the Acorn Electron computers. Most keywords in the version of BASIC that came with the computer had a corresponding key, so if you were writing a program, you'd simply hit CapsLckFn-P for PRINT or CapsLckFn-E for ELSE etc. It worked surprisingly well for coding. If you look carefully, you can see the keywords printed on the front of the keys. http://ewyse.files.wordpress.com/2011/03/acornelectron_top.jpeg http://ewyse.files.wordpress.com/2011/03/acornelectron_top.j...
- adestefan 13y agoCool keyboard. It's also interesting since you assumed, and all of us would have, P would be PRINT, but it's actually PLOT. PRINT is on the /.
- drivers99 13y agoIn a lot of old BASICs you can type "?" instead of "PRINT" [1]. I bet that's why they put PRINT on that key. Just an observation. [1] for example: http://www.antonis.de/qbebooks/gwbasman/print.html http://www.antonis.de/qbebooks/gwbasman/print.html
- nilved 13y agoUsing xcape and xmodmap, I remapped caps lock to behave like control when held and escape when tapped. That allowed me to remap control to hyper. I've really liked this setup so far.
- K0nserv 13y agoI use the same trick to remap caps lock to "shift+cmd+alt+ctrl" or "hyper". My configuration is highly centered around using slate with the standard h,j,k,l and also u,o,n to manage my windows. On top of that I also use the left side of my keyboard for focus binds, for example hyper+q is Chrome and hyper+e is iTerm2. Here is my slate configuration for anyone interested: https://gist.github.com/k0nserv/8151008 https://gist.github.com/k0nserv/8151008
- a_olt 13y agohttps://upload.wikimedia.org/wikipedia/commons/7/71/Das_Keyboard_closeup.jpg https://upload.wikimedia.org/wikipedia/commons/7/71/Das_Keyb... The possibilities are endless, of course :)