Sunday, 6 August 2006

Keyboard shortcuts: key to computer productivity?

For me, the biggest payoffs for my productivity (efficiency, time-saving) when using the computer came from learning just three things:
  • touch typing
  • copy/paste, and
  • keyboard shortcuts, keyboard mnemonics or "hotkeys" (especially to navigate between and within open applications and dialog boxes, access menu items and other commands, and of course copy/paste) - I'm just going to use the phrase "keyboard shortcuts" generally.
You can't do much to speed up the "computer output" end except get a faster computer with more memory, optimise it and keep it ticking over smoothly. But on the "input" end, using just the keyboard (with two hands) rather than continually moving a single hand back and forth between mouse and keyboard can make all the difference. Unless and until speech recognition is perfected, perhaps, for me there's no faster way to control a computer or input data. I'm not dissing the mouse - for those new to computers it's user-friendly and helps overcome any fear factor. But once someone becomes comfortable working with computers, to become more productive and efficient I swear the keyboard's the key.


Of course the most important purpose of keyboard options for computer use is accessibility, so that people who can't use a mouse for physical reasons can still use the program - for most things at least, under the W3C's Web content accessibility guidelines or WCAG 1.0, guideline 9 - notably checkpoints 9.4 (logical tab order) and 9.5 (hotkeys for important links etc), or WCAG 2.0 working draft guideline 2.1 (make all functionality operable via a keyboard interface). But keyboard shortcuts also facilitate much more effective computer use generally.

Speed and efficiency

Someone remarked I work three times faster on the computer than anyone else he'd ever seen. It's all down to the keyboard. I rely on it so much, it's so instinctive to me, that I just can't use any app which doesn't have proper keyboard shortcuts. It's not simply principle; I just find them too slow and frustrating, I have to stop using them for my blood pressure and sanity (yes, I'm an impatient sod!).

Not enough hotkeys, especially for navigation, was why I gave up on apps such as the Windows version of the popular blogging software ecto, which many swear by, and Evernote (otherwise very close to my ideal note-taking software, and it's getting there, but I'm still waiting for full keyboard shortcuts). Hotkeys shortage is also why I don't use the new Google Notebook much. Those apps may have added more keyboard shortcuts since I last tried them - but my point is, I didn't stick with them long enough because they didn't have enough when I first tried them out. I'll go back to them from time to time and see if it's improved, when I have time.

Standard hotkeys

In Windows (the OS I know best), hotkeys are mostly standardised e.g. Tab or Ctrl-Tab to move between certain sections of a window or dialog box, Enter to select, Esc to cancel, Home to move to the start of a line, End to its end, etc. So once you've learned the main shortcuts you can use them in other applications too.

"Ctrl-Tab" means hold down a Ctrl key, then press and release the Tab key, then release the Ctrl key. Similar for "Alt-F4" and the like.

That's partly why I get annoyed with apps (e.g. the BBC's trial iMP aka MyBBCPlayer) which have no keyboard shortcuts or use non-standard ones or just don't provide enough hotkeys. Though for me "enough" means keyboard alternatives for everything, not just a few main commands! Obviously a drawing program designed for stylus or pen input is a totally different beast: what I'm talking about is keyboard alternatives to the mouse for navigating and executing commands.

Some good lists of standard keyboard shortcuts (sorry for the Microsoft/Windows-centricity but it's the main OS that I know, and still the most common one):
My personal favourites are Alt-Tab to move between open windows, Ctrl-c, x and v for the good ol' copy/cut/paste, Enter and Esc of course (to select/not), Alt-underlined letter to select menu or dialog box items, Ctrl-p to print, handling documents/files with Ctrl-n (new doc), o (open doc) and s (save, which I now habitually do whenever I pause for thought, after having lost too much work to crashes), Ctrl-F4 and Alt-F4 to close a window/document or application, navigation with right/left arrow and PageUp/Down, Home/End and Ctrl-Home/End (and I was, yes I admit it, delighted when I learned that holding down the Shift key while navigating over text also selects it) or with Tab or Ctrl-Tab (and their shift options for going backwards), typing the first letter of an item in some views to get to it, spacebar to select certain items with Shift or Ctrl to select adjacent or non-contiguous items, Ctrl-a to select all items in a list or all text etc in a document, formatting hotkeys like Ctrl-b, i, u, and Ctrl-z to undo, Ctrl-f to find, Ctrl-Esc for the start menu, Windows key-d to show the Desktop (there's another hotkey for that which sometimes doesn't work, but this one always does for me).

Blogging keyboard shortcuts

I have yet to find the perfect blogging tool that supports the keyboard shortcuts I want. As I mentioned, Ecto for Windows just didn't have enough hotkeys when I tried it. In Blogger itself, you can use a few shortcuts like Ctrl-b, Ctrl-u, Ctrl-i to embolden, underline or italicise highlighted text, and Ctrl-shift-a to add a link to the selected text (there's a full list of Blogger keyboard shortcuts). But there's no hotkey to switch between Compose and Edit HTML view, or to save a draft without leaving the compose/edit page.

I've ended up drafting my blog posts in plain text in a draft email in Microsoft Outlook (Ctrl-n for a new draft, combined with hotkeys via something like Shortkeys Lite, see below), or using the free open source WYSIWYG HTML editor NVU (available for Linux and Mac OSX as well as Windows) - both of which can save drafts. NVU has some shortcuts, though for headings they involve more steps than I'd like. The trick with NVU is to copy all the finished text from the Normal view then paste into Blogger's Compose view (if you copy/paste from NVU's HTML source view, the line breaks NVU inserts all over the place in the source HTML will muck up your post in Blogger if like me you have "Convert Line Breaks" turned on).

I did try Rocketpost which seemed to have tons of keyboard shortcuts for almost everything, but it was just too buggy or crashed or just didn't work at all when I tried it. If anyone knows a blogging tool that publishes to Blogger and has hotkeys for everything in sight, please let me know!

Browsers and Webpages

Browsers have some keyboard shortcuts - see this great table of hotkeys for Firefox, Opera and Internet Explorer (except I'd point out that: (1) you should ignore the capital letters, you don't need to press a Shift key as well to operate those shortcuts, just the lowercase letter is fine; and (2) Ctrl-l works to open a new location or address for all 3 browsers, not just Firefox). Alt-F4 or Ctrl-w is a particularly handy one to get rid of pesky popup windows fast.

UPDATE: see this post on how to use keyboard shortcuts to speed up IE browsing, but note also my comments about ctrl-l and Searchy.

But I've always been frustrated that keyboard navigation within the body of Web pages is so limited. In most cases you can only cursor or page up or down. Or you can move forward/back betwen links or form elements via Tab/Shift-Tab, as per the WCAG recommendations that keyboard access to important links, form controls and links to form controls should be provided in a logical tab order (though did you know that in 2004 Microsoft obtained a patent on using the Tab key to move between hyperlinks on a web page? See e.g. Out-law writeup. I personally think the USA has gone too far in allowing patents on what I feel shouldn't be patentable, but that's another story...)

Keyboard access to links such as navigation menus etc can be built in when putting together a Web page (example of how using the "accesskey" attribute, which also works for forms), but very few sites incorporate them, I've only come across one or two in my whole surfing life. The UK government has recommended a standard system for accesskeys:
S - Skip navigation
1 - Home page
2 - What's new
3 - Site map
4 - Search
5 - Frequently Asked Questions (FAQ)
6 - Help
7 - Complaints procedure
8 - Terms and conditions
9 - Feedback form
0 - Access key details
(and the BBC website uses a variation on that.)

Furthermore you can't highlight or select text or pics for printing or copying with just the keyboard - you have to use the mouse.

That's why I was delighted to discover, when I was hunting for a copy link text extension for the Firefox browser, that Firefox lets you go to a specific part of the webpage, AND select text, with the keyboard only. You just have to go to Tools, Options, General tab and under Accessibility pick "Allow text to be selected with the keyboard" (and, if you wish, "Begin finding when you begin typing", which means you can get to the Find box quicker).

(But with Firefox 1.5 onwards, on my system at least, when I first launch Firefox the page down/up keys no longer work and trying to type into an input box in a form initially types it into the search page box instead, but switching back and forth between tabs or apps seems to sort it eventually. It's annoying though. As pasting a URL into a new tab, which also no longer works initially to paste anything at all.)

I also hate Webpages without a logical tab order, which completely ignore the WCAG recommendation, when it's easy for the Webpage designer to specify the tab order (using tabindex, e.g. for forms). For instance, the Cahoot internet bank's application pages, hitting Enter at the end of the form effected a Cancel rather than moving to Next page. That's not down to the browser, but whoever designed the page. (They could have dealt with inadvertent OKs with an "Are you sure?" popup at the very end of the application rather than defaulting to Cancel for Enter for each page of the application.)

I've still not worked out how to move to the start or end of the line in Firefox's View Source window, right after doing a search to find the line I want then hitting Esc to move from search box to source code window. In that situation, Home or End won't move within the line but moves to the top or bottom of the window (those keys can move to start or end of line as expected, but only if you've clicked within the line with the mouse, not if you got to the line by searching, which defeats the object of using just the keyboard). So I still mutter when I inadvertently end up at the top or bottom of the screen instead. If anyone knows how, may I offer you chocolates or beer to tell me?

UPDATE: for keyboard shortcuts to navigate Google and other search engines' results pages, try Search Keys, a great free extension for Firefox.

Hotkeys software

With software that doesn't provide enough hotkeys for me, I survived by using the free Shortkeys Lite, which lives in my startup folder. As mentioned earlier I mostly draft posts for my blog in Blogger's post editor direct, or in NVU (whose hotkeys aren't as quick for some things as I'd like, such as h3 tags) . With blogging I depended entirely on Shortkeys shortcuts for "http://" (I use 3 keystrokes), "<a href=""></a>" (3 keystrokes then cut and paste the closing tag) and similarly for img, h3, h4 and (3 or 4 keystrokes only!) blockquote and bulleted list. However Shortkeys Lite is limited, you can only have 15 (or with the old version which I still have, 30) hotkeys.

I'm now trying out the open source Autohotkey, which looks excellent and seems very customisable (and of course it's free!), but it's early days yet. I may report further after using it more fully if there's any interest.

PDAs and keyboards

I can draft on the Tube, or even in the little room (ahem), using my beloved though greyscale-only Psion 5mx PDA, whose innovative slide-out keyboard has never been beaten (and it's interesting that although the Palm with its small form factor and colour touchscreen soundly saw off the Psion, the keyboard is now making a comeback via the Blackberry and the like). The Psion's keys are big enough to touch type quite quickly on, at least if you have slim fingers like me. Its serial cable connects it to my PC in 1 or 2 seconds (a serial to USB converter works fine), and I can copy from an open document on the Psion and paste to any app on the PC in another couple of seconds, or vice versa (it's also a doddle to backup in the background with the supplied PsiWin software). In a fire, my 5mx is one of the first things I'd grab, and its superb keyboard (plus wide screen and 3 zoom levels) is a major reason.

No, this bit has nothing to do with keyboard shortcuts (though you can get them on the Psion 5mx too), it's just another paean on the benefits of using a full keyboard for writing stuff fast and easily when you can touch type. And a lament that no PDAs/mobile phones these days have a keyboard as good as that.

Your views on computer productivity?

Of course, all this just reflects my own views and experiences. I'd be interested in other views. Am I starting to make a keyboard convert out of you too, or are you already one? What few basic things do you think are the key to computing productivity? What are your fave hotkeys? (or would you think admitting you have fave hotkeys would make you a saddo? Well come join me in the saddo corner then, and let's have a cuppa...).


Anonymous said...

you might want to check out Keybreeze. This is similar to Autohotkey, but I think it has more features.

Improbulus said...

Cool, thanks for the suggestion anon, will give it a go when I get the chance.

@ndy said...

Do you still use the Psion now that you've got the iPod Telephone thingy?

Improbulus said...

@@andy I do, especially for drafting long blog posts, but not as much as I used to - I mostly draft blog posts at a full computer nowadays.

The iPhone onscreen touch keyboard is remarkably accurate and quick and fine for email.