Hacker News new | ask | show | jobs
by vvhn 4619 days ago
" /* 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

2 comments

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.