Apple Keyboard bindings

by: dermdaly

Got an Apple Keyboard™? Disgruntled with the way the PageUp/PageDown/Home/End buttons only move the screen and not the cursor? Well, gruntle no more with this handy tip! (Windows users can feel smug in the knowledge that their keyboards have always had this functionality*.)

In ~/Library/, create a directory called KeyBindings. In this directory, create a file called DefaultKeyBinding.dict, and enter the following bit of crunchy magic goodness:

{
"UF729" = ("moveToBeginningOfDocument:","setMark:"); 
"UF72B" = ("moveToEndOfDocument:","setMark:");
"UF72C" = ("pageUp:","setMark:"); 
"UF72D" = ("pageDown:","setMark:");
}

Restart any Cocoa application that that uses Cocoa Text System, and the new keybinding will take effect in that application, as if by magic!

CAVEAT: XCode overrides the default text keyboard bindings, so you’ll need to update the keyboard bindings manually.

Goto Preferences / KeyBindings / Text Key Bindings, and update the following actions with the relevant keystrokes:

Mode to Beginning of Document: ↖
Mode to End of Document: ↘
Page Down: ↡
Page Up: ↟

Now, you have a wonderful keyboard with really actually usable and useful navigation keys!

* Shame about the rest of the Windows user experience, haha.

You May Also Like

We built a product in a lockdown

At the start of the lockdown, around March last year, I have to admit a case of the jitters. I was prospecting on five different projects. Some with existing clients, some with new clients. Our order book was good - but we always have to have an eye on up coming...

read more
The Rise of the Super App

The Rise of the Super App

Imagine being able to chat with your friend through instant messaging, then book dinner, a movie or a gig and pay for everything all from one single app. That’s the power of a super app.  Mobile users worldwide have dedicated apps for specific tasks. This is not...

read more

0 Comments

Submit a Comment

Your email address will not be published.