65: Twiddling

It's always a good sign when another long-time Mac user offers a tip by starting "Did you know about…?" Last week, Phil Dokas asked me:

As far as I knew, I'd never intentionally used this feature. But for some reason, as I opened up a TextWrangler window to try it out, the word "twiddle" sprung to mind and I became fairly certain what would happen when I pressed ⌃T. The letters flip-flopped. I selected an entire word and tried it again. I thought the entire word reversed, but then I realized that only the first and last character swapped places, and my brain was trying to make sense of the difference.

This is such a tiny feature that you may ask what value it possibly has. For basic typos like 'teh' instead of 'the', twiddling won't save much time over backspacing and retyping. But recently I created a comma-delimited list with spaces before the commas instead of after, and it looked a mess. I could've gone through and twiddled those characters in just a few seconds. Sure, a regular expression would also have done the trick, but that would have meant ferrying the text back and forth to an editor.

You see, ⌃T is a system-wide feature. It works basically everywhere: Pages, Terminal, open/save dialogs, even renaming a file in the Finder. I'm not sure when it first entered OS X, but there's evidence that it goes back to at least 2004, with precedents in BBEdit and — of course — emacs before that. (Sorry, vi purists.)

It's odd to learn that there are undiscoverable, two-button keyboard shortcuts lurking throughout the system. This is especially true if, like me, you love automation. I naturally assume that in most apps, control is a "free" key; command, shift-command, and option-command do all the heavy lifting. I even used Keyboard Maestro to assign a ⌃T shortcut for showing and hiding the sidebar of Finder windows. Since Keyboard Maestro intercepts keypresses early, that effectively blocks twiddling anywhere in the Finder. I should just go back to the default shortcut, ⌥⌘T. That will be a shift in muscle memory, as will learning to make ⌃T twiddling work for me. But I expect, now that I know of its existence, it will come in hnady.