Live data from Hacker News

Ask HN: How can you make a MacBookPro keyboard productive for programming?

news.ycombinator.com

1–10 of 14 posts

Re: Ask HN: How can you make a MacBookPro keyboard productive for programming?

#4

Type code on it, productively. Seriously though, where do you feel it's failing compared to other keyboards? As far as laptop keyboards go, it's one of the best I've used.

Lack of single key Home/End and forward delete etc. All are somewhat possible with the Fn key, but that makes crazy combos and go to start/end of line also is a pain...

Re: Ask HN: How can you make a MacBookPro keyboard productive for programming?

#5
Get https://pqrs.org/macosx/keyremap4macbook/ , then pick the keys you need. I have my right side command and option as page up and page down, eject as (forward) delete, and PC style home/end on the arrow keys (I think that removes some inconsistencies between programs).

I had been using Windows for the previous 17 years or so, so I also switched control and command.

Re: Ask HN: How can you make a MacBookPro keyboard productive for programming?

#6
post #4

Type code on it, productively. Seriously though, where do you feel it's failing compared to other keyboards? As far as laptop keyboards go, it's one of the best I've used.

Lack of single key Home/End and forward delete etc. All are somewhat possible with the Fn key, but that makes crazy combos and go to start/end of line also is a pain...

[deleted]

Re: Ask HN: How can you make a MacBookPro keyboard productive for programming?

#7
post #4

Type code on it, productively. Seriously though, where do you feel it's failing compared to other keyboards? As far as laptop keyboards go, it's one of the best I've used.

Lack of single key Home/End and forward delete etc. All are somewhat possible with the Fn key, but that makes crazy combos and go to start/end of line also is a pain...

There are keyboard shortcuts for much of this behavior:

ctrl+a goes to the beginning of a line ctrl+e goes to the end ctrl+k deletes a line

Re: Ask HN: How can you make a MacBookPro keyboard productive for programming?

#8
Someone else mentioned Keyremap4macbook (https://pqrs.org/macosx/keyremap4macbook/). There's a huge amount of customization there, enough that you should be good to go just by looking through the options there. My favorite is remapping Caps Lock to Left CTRL. Then you can remap Left CTRL to be escape by itself, and CTRL+ when pressed with other keys. It's very handy in Vim, especially.

A couple other recommendations, however:

BetterTouchTool: The MBP trackpad has a surprising amount of complexity in terms of recognizing gestures. BTT adds to that . http://www.boastr.net

Keyboard Maestro: Scripting and advanced keyboard shortcuts. Includes support for per-app shortcuts, which is pretty phenomenal. http://www.keyboardmaestro.com

TextExpander: Less practical when you're programming, but TE can be great for automating things you write often (email address, email responses, URLs, etc.) http://smilesoftware.com/TextExpander/

Re: Ask HN: How can you make a MacBookPro keyboard productive for programming?

#9
post #4

Type code on it, productively. Seriously though, where do you feel it's failing compared to other keyboards? As far as laptop keyboards go, it's one of the best I've used.

Lack of single key Home/End and forward delete etc. All are somewhat possible with the Fn key, but that makes crazy combos and go to start/end of line also is a pain...

If you use emacs style bindings, then control+a goes to start of line, control+e goes to end of line. Forward delete is control+d.

If you use Wordstar bindings, then control+q,control+s is start of line, control+q,control+d is end of line. Forward delete is control+g.

The Wordstar, Emacs and Vi keyboard bindings evolved in the days before dedicated keys for cursor movement functions, so they are useful as long as you have the requisite additional modifier keys. I.e., like when you are on a laptop with a limited number (or none) of dedicated cursor movement function keys (or with those same keys hidden behind odd Fn keystroke combos that differ between any two different laptops).

Post reply on HN