Hacker News new | ask | show | jobs
by fit2rule 4619 days ago
Yeah, like .. and also, be careful with the 'plugins' of a 'keyboard' manager, kiddiez .. these are helaciously un-inspected playgrounds for harvesting. It may "improve" your developer chops, but then .. "it may not".

There are ways to change the keyboard home/end key without needing an app to download. For example, a bit of Google instead yields:

    $ 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 */
     }
(from Matt: http://mwholt.blogspot.co.at/2012/09/fix-home-and-end-keys-o...)

Why require a third-party to do such things, developers?

And also, umm .. dotfiles, kidz? Really, just like that? wtf. Please do not encourage such glib attitudes in an article intended for 'quick action', but rather .. dissect the thing. A collection of links with explanatory text is one thing.. Take some time, this isn't homework. Dig deeper.

(+todo: grep -ir ".dict" this_article_suites_.x//)

1 comments

" /* Remap Home / End keys to be correct */"

only when correct == "Windows Convention"

Home and End keys on the Mac (on applications which don't override default behaviour for these keys) are conventionally the same as old UNIX - they take you to the beginning and end of the document and not the beginning and end of the line (as on Windows).

http://en.wikipedia.org/wiki/Home_key

The point is, as developers, we can master whatever conventions matter to us. Me, personally - I use Home and End in the line context, not the document context.

So I'm quite happy knowing how to bend the computer to my will and not the other way around.

oh totally - I was just objecting to the use of the word "correct" :).
So how do you go to the start/end of lines then?
There are 2 options (on applications which havn't overridden default key bindings) -

a) cmd-left arrow for beginning and cmd-right arrow for end of the line.

b)emacs key bindings are available as well control-a and control-e for the beginning and end of a line.

Option a) gets slightly complicated in text entry on edit controls of browsers which have the cmd-left arrow key mapped to previous page (Firefox). In addition, a lot of multiplatform software ends up making things behave like on Windows ( Microsoft Office being one) by overriding defaults for these keys and home and end keys do take you to the beginning and end of the line there.