00221: Fast Edit: Accesskey and Tabindex

Summary: Fast Edit: Accesskey and Tabindex
Created: 2004-12-07 18:06
Status: Closed - see Cookbook:AccessKeySkin?
Category: Cookbook
Assigned:
Priority: 1
Version: 2.0 beta 6
OS: all

Update: I've just looked at the release notes for beta 6 and read about the new AccessKeySkin. So the following is already old hat. Except, perhaps, for the Tabindex trick and adding tooltips by using 'title='. Also this encourages users to add access keys to any skin...

Description: Here are some tips to help speed up your editing if you like to keep your hands on your keyboard.

Currently in PmWiki if you want to edit a page or to save a page, you have to take your fingers off the keyboard and use the mouse to press on a link or button. Wouldn't it be nice if you could just keep typing. Here is how to customize your PmWiki to use access keys and tabbing for editing pages and saving changes.

Desired Action:

Press the Alt-Z key to jump to "Edit page". Note "Z" is chosen so as not to conflict with the Alt-E that usually calls the Edit menu in your browser.

Once the editing page appears, press the Tab key to jump to the end the text in the textarea.

When you are finished editing, press the Alt-S to save.

If you like to save frequently and want to to this without interrupting your thoughts, get in the habit of going: Alt-S, Alt-Z, Tab...

How-to:

Change pmwiki.tmpl line 36:

From: <a href='$PageUrl?action=edit'>Edit Page</a></td></tr></table>

To: <a href='$PageUrl?action=edit' accesskey='z' title='edit (alt-z)'>Edit Page</a></td></tr></table>

Edit your config.php by up the Cookbook entry LayoutEditModified item.

In your config.php, hange the following lines:

From: <input type='submit' name='post' value=' Save ' />

To: <input type='submit' name='post' value=' Save ' accesskey='s' title='save (alt-s)'/>

From: <textarea name='text' rows='25' cols='65'

To: <textarea name='text' rows='28' cols='65' tabindex='1'

Happy faster editing!


Yes, I did similar things in Cookbook:AccessKeySkin?. Maybe I'll switch to ALT+z, or else enable both ALT+z and ALT+e for editing. The idea of using the tabindex for the edit form is an excellent one -- I'll probably tag index a couple of items there. --Pm