Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've plugged a basic UK Windows keyboard into my MacBook. I keep hitting Home & End but they don't work as I expect, they jump to the top/bottom of the document/page rather than the start/end of the line. It's very annoying since I am doing this automatically as I type!

Is there a way to make them work as I expect, i.e. why don't they map to CMD+LEFT/RIGHT?

share|improve this question

Create ~/Library/KeyBindings/ and save this as DefaultKeyBinding.dict:

    "\UF729"  = moveToBeginningOfLine:;
    "\UF72B"  = moveToEndOfLine:;
    "$\UF729" = moveToBeginningOfLineAndModifySelection:;
    "$\UF72B" = moveToEndOfLineAndModifySelection:;

See TextMate Blog » Key bindings for switchers. pageUp: and pageDown: don't work in Safari, Chrome, or iWork applications.

It doesn't work in all applications or text views though. Another option would be to use KeyRemap4MacBook:

You can customize the setting by copying it from here and adding it to private.xml.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .