Work

Use Caps Lock For Hand-Friendly Text Navigation

After we showed you how to disable the Caps Lock key, reader Philipp wrote in with his unbelievably geeky use for the otherwise pointless key—by using it to help navigate while editing text.

Photo by Mike On MauiPhilipp’s idea was to use the Caps Lock key as a way to toggle keys on the front row for navigation instead of having to constantly reach for the arrow keys—so you hold down Caps Lock and use J, K, L, I to move the cursor Left, Down, Right, and Up.

He took it a few steps further and added keys that simulate Home, End, and even copy/paste—might be a little complicated to learn at first, but once you get used to it, you might just be sold on the idea. Since he implemented all the functionality as an AutoHotkey script, you can easily adjust it to fit your own needs—I’m working on my own version that uses the vim keys instead.

The list of functions includes:

Normal usage with capslock as a modifier:
j: left
k: down
l: right
i: up
h: simulates CTRL+left (jumps to the next word)
ö: simulates CTRL+right (commented out, you will need to adjust for your keyboard layout)
,: simulates CTRL+Down
8: simulates CTRL+Up
u: simulates “Home” (jumps to the beginning of the current line) (i forgot to mention this in my comment)
o: simulates “End”
Backspace: simulates “Delete”
b: cut
c: copy
v: paste

If you keep pressing Alt in addition to Capslock it works as if you are pressing “Shift” –> you highlight the text. Shift + Capslock activates the actual Capslock functionality (normal capslock-hitting deactivates it again).

The Hand Friendly Navigation script is a free download for Windows, requires AutoHotkey. Great job, Philipp!

Got your own ubergeeky method for navigating around your operating system with the keyboard? Send us an email at tips [at] lifehacker.com, or just share it with everybody in the comments.

HandFriendly AutoHotkey Script

Comments (AU Comments | US Comments)

  • jesuswhammy

    I THINK ITS ONLY PURPOSE WAS TO MAKE IT EASIER FOR PEOPLE TO "YELL" AT OTHERS LIKE I DID HERE...YOU HEAR ME...I'M YELLING WITHOUT HAVING TO HOLD DOWN MY SHIFT KEY...THAT'S RIGHT...WHAT!!!!

    jesuswhammy

  • mahumphrey

    @sciamannikoo: know how to use it properly? You either want to make something all caps or you don't. I'm pretty sure there isn't anything to know there. Besides, the smart play is to use autohotkey to change the capslock to a shift+capslock and then repurpose it to something more... ... purposeful.

    mahumphrey

  • TheQwerty

    I wrote a similar script a while back, but it was mostly for mouseless navigation.

    Instead of having different modes for Ctrl/Shift/Alt most of the keys are blind and will use the current state, so you can do Capslock+Shift+J to do Shift+Down.

    You can either hold Capslock to activate the keys or hit Capslock+Space to turn it on, and then Capslock again to turn it off.

    To see a list of the keys you can use Capslock + /.

    Feel free to give it a try or claim the source as your own, you'll need the two AHK files and the ICL.
    [code.google.com]

    TheQwerty

  • Arphahat

    @sciamannikoo: I was going to post something similar. I use the Caps lock key all the time. Especially useful for acronyms. I was surprised to see all the "hate" for it.

    Arphahat

  • Phil_768

    @Phoshi: This function is in the script included, too. I hope nobody was afraid that he couldn't shout in IRC anymore :D

    Phil_768

  • Phoshi

    @knoxjon: That's why I have shift-caps toggling caps, sometimes it's useful.

  • sciamannikoo

    The so called "pointless and obsolete" capslock key, is not so pointless if people knows how to use it properly.

    Instead I find really pointless keys like Scroll Lock and Sys Rq (the first obsolete, the second never really used for a specific purpose).

  • Roy Jacobsen

    @knoxjon: Hear, hear. As a techwriter, I frequently have to type things that are all-caps. Keep your mitts off my CapsLock.

  • Chris Memering

    @el_giblet: Or it was Crusty the Clowns...

    Sorry, that was a lame joke, but the first thing I thought when I saw that keyboard, was damn, that thing is crusty....

    Chris Memering

  • VonHart

    I have mine routed to the apple key. I have a Logitec Mediaboard Pro bluetooth keyboard (the one for PS3) without an apple/widows key, so this allows me to use a $60 keyboard with trackpad just like a $150 dinovo.

    Works like a champ.

    VonHart

  • Phil_768

    Thanks for publishing my idea/script! Maybe I should highlight that it is especially useful for people who type with ten fingers.

    Apart from the mentioned text-navigation-fact it's useful if some stupid program doesn't support the use of the tap-key and requires you to use the (far-off) arrow-keys.

    Phil_768

  • phynx

    @allauthors@ViEmu useful. I use it in Visual Studio 2005 and it works really well.

  • oshawn

    @Andrew Abrams Marchant-Shapiro:

    I was reminded of the same thing, except wordstar used the left hand for most of the directional navigation. I like not having to take my hands off the keyboard.

    oshawn

  • Psonar

    I've honestly never desired a vim-like text browsing interface. I wish every textbox was a notepad++ object (or just scintilla driven).

    Another Idea: Caps Lock => Context Menu

    I just remembered that my new wireless keyboard doesn't have the "right-click context-menu" key that I had gotten used to using... it's the funny key between the Right Win and Right CTRL on many keyboards. I'm forced to either use the Windows universal Shift+F10 keyboard shortcut or the wireless keyboard's replacement FUNC+F12 or something... I despise FUNC keys (for things other than screen brightness, external display, etc. on laptops).

    Using Caps Lock for the right click context menu might be pretty darn awesome!

    I especially find myself using it in Microsoft Word, Excel, and Powerpoint where you can quickly correct spelling while typing if you open context menu on a spell-check-underlined word. Anything else in the context menu like formats I do with their specified shortcuts. Still comes in handy for odd context-menu tasks like removing hyperlinks.

    Or I just use the mouse... :P Every friend that I've tried to get into keyboard shortcuts turns out to be a mouse-lover who's more likely to geek on keyboard-less computing. They would never understand right-clicking with the keyboard...

    Psonar

  • Phil_768

    @Dreadnought: The answer is simply that you have to move your hand 10 cm to reach the "1 key". If you type with ten fingers (like me) it's very annoying to switch between these positions. That's why I created the script.

    Phil_768

  • Phoshi

    I must admit, I've never seen having to stretch for the home section annoying, my right hand is normally over there anyway. I might have a look at doing something like this, but I'm already differentiating between different shift and control keys, I don't -have- any modifiers left ;_;

  • Phoshi

    @Dreadnought: pause/break can easily be mapped to play/pause most media players, making it a bloody brilliant key. I want more like it.

  • cha0tic

    Caps lock is cruise control for cool.

  • Andrew Abrams Marchant-Shapiro

    Anyone else here old enough to remember WordStar?

    Andrew Abrams Marchant-Shapiro

  • creeront

    @allauthors:

    I wrote a script very similar to this last summer and submitted it to Lifehacker. There are some problems, however.

    The problem is that this only works when editing rich text boxes, which many fields in windows are not (the itunes search bar, e.g.)

  • Dreadnought

    Genius! Wait.....Why hold 1 key and hit another key to move up and down, left and right, when I can hit one key and get the same functionality? And Caps Lock isn't the most pointless key, Pause/Break is. I just set Caps to mute and ScrollLock and Pause/Break to volume up/down since I don't have volume controls on my keyboard.

  • Phoshi

    @Betts26: It's a warning light, so you know to turn it off again.

  • ahawks

    It's not as full featured as this, but you can remap Caps Lock to something else (backspace, Control, escape, etc) in Linux with the xmodmap command:

    # Make the Caps Lock key be a Control key:
    xmodmap -e "remove lock = Caps_Lock"
    xmodmap -e "add control = Caps_Lock"

    Source: [www.columbia.edu]

    ahawks

  • knoxjon

    Not all of us hate caps lock, btw. In the business world, lots of forms have to be done in upper case. I am forever toggling caps lock on and off on my business computer, so I am grateful to have the dedicated button.

    knoxjon

  • brianary

    My coworker uses a registry hack that makes Caps Lock a sort of Meta key for a more VIM-my, keyboardy Windows.

    brianary

  • cadet cadoo

    Any way to get this going on OS X?

  • Betts26

    I always wondered why the most pointless key on my keyboard got its own little green light.

    Betts26

  • The How-To Geek

    @allauthors: Yes, I definitely will... But I wanted to make sure and show off Philipp's very innovative script first and see what ideas our great readers come up with =)

  • Matt Lindley

    I currently use AutoHotkey to capture the Caps Lock key press and launch Firefox. Love it.

    Matt Lindley

  • Confuzius

    This does seem like a good way to vim-ify everything else.

    Confuzius

  • allauthors

    I'd be really interested in the "vim" implementation. I'm constantly frustrated by my lack of vim "mode" support when typing in textboxes, word, email, etc. This sounds like just the ticket. Will you post another article (or comment) when you have it done?

    allauthors

  • PajamaJames

    Very cool, but it would take time to get used to.

  • Alden Pyle

    I swap the caps lock and the left ctrl key, like a Sun keyboard. It makes control characters much easier to use.

    Alden Pyle

  • Kelcey Cahill

    That is a seriously nasty keyboard.

    Kelcey Cahill

  • el_giblet

    I think this keyboard once belonged to DirtMan (early DC Comics).

    el_giblet

  • Izkata

    Wait... what?

    Oh, this isn't for VIM.

    Suggestion for VIM users: map Capslock to Escape.

  • Gyroscope352

    This is bloody brilliant. Especially for those that are using condensed keyboards, i.e. those on laptops, or the external bluetooth apple keyboard.

  • furas

    Caps Lock + W,S,A,D and I can use it with one hand :)

  • nortexoid

    @el_giblet: Me too. It looks nasty filthy.

    nortexoid

  • moviscop

    am i the only person who uses caps lock instead of shift, and still types fast?

    i must have missed that pro-tip as a child.

  • hyborg

    I want to share my script for left handed navigation. It really helped me a lot when I broke my right arm.

    Just hold CapsLock and press a button for a navigation. A old CapsLock function can be switched by CapsLock + Shift.

    ---

    ; CapsLock left-handed navigation
    ; Written by Hyborg

    #NoEnv
    Suspend On

    w::Up
    a::Left
    s::Down
    d::Right
    q::Home
    e::End
    r::PgUp
    f::PgDn
    g::AppsKey
    v::.
    b::,
    t::=

    z::Backspace
    x::Delete
    c::Enter

    ; remap {
    1::+sc01A
    ; remap }
    2::+sc01B
    3::;
    4::(
    5::)
    6::=

    Alt::Ctrl

    CapsLock::Suspend Off
    CapsLock Up::Suspend On

    hyborg

  • iDesire

    @Dreadnought: I have to retain the Break key because I always use it with Lotus Notes for the Ctrl+Break command.

    That said, I like your idea about mapping keys to media player. Perhaps I can do that to the ScrollLock key and the Prt Scr key (since I use Faststone Capture for my screen-cap needs).

    iDesire

  • paintbox

    Interesting post but not something for me. Capslock has been rehab'd as an ENTER key. Besides, the cursor keys aren't out of my way on the desktop machine. All the keys are close at hand really.

    I can see this being more helpful for people with small hands or short fingers though.

    paintbox

  • jokermatt999

    @Izkata: I've found that helpful even when not using vim. Escape is just more useful overall.

    jokermatt999

  • Dan Atwood

    @Phoshi: It makes the text EXTRA black and powerful.

    Dan Atwood

  • Dan Atwood

    @Phil_768: Ooops wrong post... I was too focused on my caps lock key...

    Dan Atwood

  • Dan Atwood

    @Phil_768: It makes the text more black and powerful.

    Dan Atwood

  • Aaron McClellan

    CAPS LOCK: No longer the exclusive domain of the belligerent!

    Aaron McClellan

  • 8abhive

    @cadet cadoo: I use DoubleCommand. There are others, and probably better, but it does the big one for me which is remapping the lower enter key to forward-delete. It also lets you map capslock a few ways, though no key-combination smarts as far as I know.

    8abhive

  • The How-To Geek

    @Phoshi: If you do a lot of writing... either articles or doing programming, moving your hands off the keys constantly can be really tedious.

    I'm a programmer by trade that writes lots of articles =)

  • joelena

    @[addons.mozilla.org]

  • joelena

    @It's All Text!" You can set it so that you use vim for entering/editing text in Firefox. It works surprisingly seamlessly.

  • hhumbert

    Fuck VIM and the horse VIM rode in on. True hackers use Emacs. Emacs was the first lifehacking editor.

    But anyway, if you're going to do it, do it using the FPS mappings:

    [code.google.com]

    hhumbert

  • Phoshi

    @Phil_768: Real shouters hold shift down EXTRA hard!

  • AndiC

    I would really love to see the finished vim style script

    AndiC

  • TheQwerty

    This is probably a better link than that one, as you don't have to click on the raw views:
    [theqwertys-things.googlecode.com]

    Unless of course you want to use SVN to check it out.

    TheQwerty

  • CapitalC

    @Phoshi: Because typing LIKE THIS wouldn't be obvious? ;)

  • bmearns

    Sweet, he invented Vi.

  • Dreadnought

    @Psonar: A simple AHK script can do exactly what you want.

    A simple
    CapsLock::Send {AppsKey}
    and you got exactly what you want.

  • Leafy

    Enso Launcher did the best job with Caps Lock... Something under-appreciated at Lifehacker.

    Leafy

  • davers

    That's weird, I had a comment here yesterday but it seems it got deleted for some reason. I did include a link, but I'm no spammer.

    Anyway. I use Enso, which is a little bit like an OS-wide Ubiquity. Holding Caps Lock opens a transparent input box in the top left of the screen through which you can type commands.

    As a quick example, selecting some text (in ANY app, which to me is Enso's biggest strength), then holding Caps Lock and typing "upper case" (or the first few letters) will convert the text to upper case. Or selecting a sum (like (43*5)/2, for example) and typing "calculator" will replace the selected text with the answer - much quicker than opening the Windows native calc.exe and working it out that way.

    You can download it at humanized.com. I use it every day and it's definitely made the Caps Lock key useful.

    Now stop deleting my posts, thanks.

    davers

  • andrew

    @[projects.serenity.de]

  • Phoshi

    @The How-To Geek: Haha, fair enough. I love the home key in coding, it gives me a small thinking break :P

  • pdragonfly

    yikes. Read as Enter button like the right hand side, but use the caps lock thats on the left side for enter also.

    Too much ginger!

  • pdragonfly

    Hi, I would really like to get an Enter button on the right side and caps lock would be great place.
    I have a laptop but its parked on a stool and I lounge on the couch using a wireless mini keyboard with a track pad (Adesso-fyi).
    When I'm just flying through sites I sometimes just use my left hand because the right is holding a bottle of something or other (Ginger Beer today - fyi).

    So kudos to the builder of this script, and how do I modify it so get an extra enter button? Thanks!!!! xoxox

  • agscala

    @Izkata:
    I actually map capslock to ctrl, you can hit escape in vim easily enough with C-[

    agscala

  • whofysh

    @Phil_768:

    Thank you, thank you, thank you.

    Worked perfectly.

    whofysh

  • math0ne

    @joelena: WOW! That extension rocks, thanks for the mention.

  • Phil_768

    @Phil_768: Ops, I meant "You need to..." not "do" and "an accent" instead of "a accent". Unfortunately, here isn't an edit function :(

    Phil_768

  • Phil_768

    @whofysh: I'm glad you like my script. To answer your question:
    You need do escape the semicolon. In AutoHotKey the escape character is a accent/backtick (`). So, just put a ` in front of the semicolon. It should work with this line:
    CapsLock & `;::
    ...

    Bye :)

    Phil_768

  • whofysh

    You made my week/month/year with this script!!!

    I have one question that would make this perfect for me.

    ö: simulates CTRL+right (commented out, you will need to adjust for your keyboard layout)

    I want to remap ; (semi-colon) to the above action. However, with ; being the symbol that denotes comments in the programming how can this be done.

    I have searched for the last day trying to find the answer. Any help would be appreciated immensely.

    TIA

    whofysh

  • Phil_768

    @pdragonfly: Hi,

    "an Enter button on the right side". Did you mean "on the left side"? If you just want Capslock working like Enter this should work for you (I hope the code won't get screwed op):
    CapsLock::Send, {Return}

    Another possibilty would be:
    Capslock & a::Send, {Return}

    I hope that helped :)

    Phil_768

  • skorned

    omg that keyboard is dirty!!! It seems all Macs seem to catch dirt quickly, despite the company harping quite a bit about aesthetics.

    (not flaming btw, this comment was written from a Mac, and I have 2 windows machines as well)

    skorned

  • digitalpowers

    while disabling caps-lock and using it for other things is fun it is even more fun to make it so the left-shift key randomly turns on caps-lock. Its a great way to drive your friends crazy.

    digitalpowers

  • GazpachoKing

    @moviscop: Umm, it looks to me like you don't use shift or caps lock key. I think maybe the pro-tip you missed was on proper English capitalization.

    GazpachoKing

  • meep.com

    This is an excellent use of the CapsLock key. Ironically, I have gone from having no use for said key, to trying to decide which function I want to use it for (ie. this or my own Caps to Alt-Tab script).

    Anyways, I personally think that left-hand navigation is a little bit better considering the Caps key is on the left. As such, I added functions for WSAD movement, so now I'm reminded of my games while editing stuff :(

    meep.com

  • razordu30

    I COULDN'T GET THIS TO WORK. =)

    razordu30

  • daron

    @skorned:

    Stop eating with your hands, it really helps!!
    (Mine is also really dirty, and it's a regular keyboard.)

    daron

  • daron

    @GazpachoKing:
    Auwtch, touché...

    @ moviscop: You actually activate it for a single capital letter?

    daron

  • serotoninzero

    @knoxjon: I'm just so used to using the shift buttons that even when I have to type in all caps for work-related things, I just use them the whole time. Doesn't affect my typing at all.

  • dekz

    @furas:

    [pastebin.com]

    W- Up
    A- Left
    S- Down
    D- Right
    F- C Style comment out line
    R- Remove line
    Z- Page Up
    X- Page Down

    dekz

  • Phil_768

    @dekz: Also nice :)
    But you can shorten "Send,{shift down}{End}{shift up}" to "Send, +{End}". I just wanted to let you know about that.

    Phil_768

Post Your Comments

Got something to say? There are two ways to comment:

1. Guests

Click here to comment instantly.

2. Facebook Users

Click below to comment using your Facebook account.

We're looking for comments that are interesting, substantial or highly amusing. If your comments are excessively self-promotional, obnoxious, or even worse, boring, you will be banned from commenting. All comments are moderated.