Settings

Theme

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

7 points by apphrase 12 years ago · 13 comments


alexmorse 12 years ago

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.

  • apphraseOP 12 years ago

    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...

    • pwg 12 years ago

      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).

    • haney 12 years ago

      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

      • jcutrell 12 years ago

        I've been very productive with these key bindings. Ctrl+d is forward delete.

        There's also a lot of other possibilities with plugins for a given editor, like Vim-style bindings in Sublime.

        I haven't yet found any real restrictions in my workflow once I learned some of those.

        Take a look at the shortcuts in nano; pretty simple stuff can help a lot. Ctrl + Y = page up. Ctrl + v = page down. Ctrl+x = exit.

kmf 12 years ago

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+<yourkey> 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/

typografy 12 years ago

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.

bcl 12 years ago

Use a different keyboard. Seriously, I've had to take mine in 3 times now because the keys keep breaking their hooks and flopping around. Right now my 6 key is feeling like it is about to go.

mattwritescode 12 years ago

Make the thing using the keyboard more productive by not asking question on HN.

benologist 12 years ago

Learning the relevant keyboard shortcuts and building that muscle memory.

Randgalt 12 years ago

Use a great IDE like IntelliJ IDEA. I use a MBP solely.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection