Fix Home Needs

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Tuesday, 25 September 2012

Fix the Home and End keys on Mac OS X (Mountain Lion)

Posted on 11:31 by Unknown
If you use a keyboard that's not designed specifically for Macs, you probably are familiar with the annoying mapping of the Home and End keys: they scroll to the beginning or end of an entire document, with no regard to the cursor's location.

Fortunately it's an easy fix. (Note: This works for native Cocoa apps only, not X11 programs.)

To get your Home and End keys working properly on Mac OS X (in my case, Mountain Lion, although this should work in prior versions back to at least Tiger), simply open the Terminal and do this:

$ cd ~/Library
$ mkdir KeyBindings
$ cd KeyBindings
$ nano DefaultKeyBinding.dict

Put these lines in that file, including the curly braces:

{
/* Remap Home / End keys to be correct */
"\UF729" = "moveToBeginningOfLine:"; /* Home */
"\UF72B" = "moveToEndOfLine:"; /* End */
"$\UF729" = "moveToBeginningOfLineAndModifySelection:"; /* Shift + Home */
"$\UF72B" = "moveToEndOfLineAndModifySelection:"; /* Shift + End */
"^\UF729" = "moveToBeginningOfDocument:"; /* Ctrl + Home */
"^\UF72B" = "moveToEndOfDocument:"; /* Ctrl + End */
"$^\UF729" = "moveToBeginningOfDocumentAndModifySelection:"; /* Shift + Ctrl + Home */
"$^\UF72B" = "moveToEndOfDocumentAndModifySelection:"; /* Shift + Ctrl + End */
}

Press Ctrl+O and then Enter to save the file, and Ctrl+X to exit. Restart your computer to have it take full effect.

Sources:
http://evansweb.info/2005/03/24/mac-os-x-and-home-end-keys
http://soodev.wordpress.com/2011/07/04/mac-os-x-remapping-home-and-end-keys/
Email ThisBlogThis!Share to XShare to Facebook
Posted in keybinding, mac, osx | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • How to take FrontRunner from Provo to SLC airport
    I see this question a lot: how do I get from Provo or Orem to the SLC International Airport entirely by train (UTA FrontRunner/Trax)? Here I...
  • Behavior-driven testing in Go with GoConvey (BDD in "golang")
    First: the built-in Go testing tools Few things bring sweeter peace to the soul than making changes to Go code, then: $ go test ... PASS ok ...
  • Automatically make a Raspberry Pi with wifi support
    Okay, I love my Raspberry Pi, but setting it up just the way I want got so involved I was afraid I couldn't do it again if I had to. So ...
  • Install PECL extensions with Homebrewed PHP on Mac OS X Mountain Lion
    I needed to use the HTTPRequest class that comes as a PECL extension to PHP. This was easier than I thought. If you followed my instructions...
  • How to set up dynamic DNS in 5 minutes
    With a dynamic DNS service (don't worry, there are free ones), you can use your domain name to point it to your home server, even if you...
  • Fix the Home and End keys on Mac OS X (Mountain Lion)
    If you use a keyboard that's not designed specifically for Macs, you probably are familiar with the annoying mapping of the Home and End...
  • How to customize your terminal prompt (with colors)
    At work, the Go projects we're working on have workspaces that get pretty deep and one of the directory names is repeated down the tree....
  • Easily get your external IP address using the terminal or command line
    I want my little Raspberry Pi to "phone home" once in a while so I know where it's at. I wanted a very simple web service that...
  • Parsing CSV with Javascript efficiently
    CSV parsing is hard. There's not a strict standard, so each implementation is a little different. And when I say CSV, I don't necess...
  • PHP output buffering on nginx
    Simple trick: if you're trying to use output buffering with PHP on nginx, and it should be working, but the whole response still comes...

Categories

  • backup
  • bdd
  • byu
  • chrome
  • cli
  • command line
  • commute
  • compile
  • cross-compile
  • csv
  • development
  • dns
  • domain name
  • fastcgi
  • fcgi
  • go
  • golang
  • homebrew
  • inkscape
  • install
  • ip
  • ip address
  • ipaddress
  • itunes
  • javascript
  • keybinding
  • linux
  • mac
  • mountain lion
  • mysql
  • nginx
  • optimization
  • osx
  • parsing
  • pecl
  • php
  • printing
  • raspberry pi
  • security
  • ssd
  • terminal
  • testing
  • transportation
  • unit tests
  • vagrant

Blog Archive

  • ►  2013 (16)
    • ►  November (1)
    • ►  October (1)
    • ►  September (2)
    • ►  August (2)
    • ►  July (3)
    • ►  June (1)
    • ►  May (1)
    • ►  April (2)
    • ►  March (2)
    • ►  February (1)
  • ▼  2012 (8)
    • ►  November (1)
    • ►  October (1)
    • ▼  September (6)
      • Restoring a lost or moved iTunes library
      • Macbook Pro runs hot with SSD and TRIM Enabler
      • Printing to BYU campus printers without extra soft...
      • Installing nginx / PHP / MySQL on Mac OS X Mountai...
      • Fix the Home and End keys on Mac OS X (Mountain Lion)
      • Pre-installed development tools in Mac OS X Mounta...
Powered by Blogger.

About Me

Unknown
View my complete profile