Re-enable Option+arrow move-by-word in Lion

Before you go whining like an impulsive brat about a reliable OS X feature that you believe has been sorely ripped out of Lion, rest assure that there’s probably a preference setting for it.

In my case, my beloved Opt+arrow move-by-word key bindings were not working after I upgraded to Lion. Turns out the default keyboard shortcuts for Mission Control were conflicting with them. Go to System Preferences » Keyboard » Keyboard Shortcuts and disable or change Mission Control: Move left/right a space.

Lion Keyboard Shortcuts Preferences

Sorry about that :P

Enabling PHP, Apache, & .htaccess in Mac OS X

I’m trying out developing without MAMP, and relying on the frameworks that are built into OS X. Here’s how I got Apache, PHP, and htaccess working:

Additionally, I changed the document root to point to my projects folder.

Within /etc/apache2/httdp.conf it can be changed in:

DocumentRoot "/Users/username/projects/"

And then in /etc/apache2/users/username.conf

<Directory "/Users/username/projects/">

Arrange icons by kind

My desktop gets messy. This cleans it up a bit, grouping items by filetype, folders first.

With the desktop focused: Finder › View › Arrange By › Kind. Or by key command ⌘⌃5

Arrange By Kind screenshot

Ctrl + Cmd + Shift + 3 / 4

Again, via Phil Dokas.

Hold Control with Cmd+Shift+3 or 4 and your screenshot will be copied to your clipboard without generating an image file on your Desktop. Paste right into Photoshop.

More Cmd + Shift + 4 hotness

Phil Dokas followed up with:

⌘⇧4, click + drag to make a selection without releasing, now hold down the spacebar and move the cursor.

If you instead hold down spacebar + shift, you lock one axis of movement.

Cmd + Shift + 4 / +Shift / +Option

After triggering screen capture with ⌘⇧4 (Cmd+Shift+4), you can use additional keys like in Photoshop. Holding down Shift (⇧) will keep lock one dimension, for changes to only the vertical or horizontal dimension. Holding down Option (⌥) will cause the overlay to be sized symmetrically.

Tested only OS X Snow Leopard. Not sure about earlier versions.

Keyboard navigation - Space vs. Enter

First off, you should have Full Keyboard Access enabled for All Controls in System Preferences > Keyboard > Keyboard Shortcuts. Now then…

shut down dialog

As a former Windows user, this dialog boxed perplexed me. I see two buttons that appear to be focused. Mind you, no mouse hover state is affecting these buttons. Restart appears to be focused, and Shut Down looks special. If I hit Enter, I would expect that Restart would be hit, but instead Shut Down is triggered.

My problem was that I was using Enter instead of Space. Hitting Enter triggers the default (special) button. Hitting Space triggers the focused button.

Twitter dialog

Now when faced with this dialog from the Twitter app, I can appropriately trigger the button I want without hitting Tab.

You can also use space to toggle checkboxes on forms. Hitting enter will submit the form.