Table of Contents

Keyboard Plugin

Description

The keyboard plugin provides a combined syntax and action plugin in order to markup text as keyboard keys, similar to (and making use of) the existing (X)HTML tag <kbd>…</kbd>. A quick button for the markup is automatically inserted into the toolbar of the edit form.

In case you come across any bugs in this plugin, don't hesitate to report them.

The Darcs repository of the plugin can be found here.

Updates

Last updated: 2008/05/04

Acknowledgements

Special thanks to Christopher Arndt for suggestions and enhancements.

Syntax

Enclose the name of a key, or a combination of keys, separated by a dash (-), in a key tag, like this:

<key>Key</key> or <key>C-x</key>

Examples:

Installation

With plugin manager

Let the manager do the dirty work, just give him this link to eat: plugin-keyboard.tar.gz

Without plugin manager

  1. Download the plugin: plugin-keyboard.tar.gz
  2. Extract it into your dokuwiki plugin folder (eg lib/plugins)

Quickbutton

A quickbutton is now inserted into the toolbar of the edit form via a small action plugin. In order for that button to show up, you might first need to purge the cached JavaScript by once calling http://www.yoursite.com/path/to/dokuwiki/lib/exe/js.php?edit=1&write=1&purge=1. Also, reload your edit form properly to purge any cached toolbar definitions from the browser cache as well.

As the event the plugin reacts on is only available in the Development version, the automaticly inserted quick button is only available in this version as well. For manual installation in prior versions of Dokuwiki – e.g. in version 20061106 – in inc/toolbar.php right after

   array(
      'type'   => 'signature',
      'title'  => $lang['qb_sig'],
      'icon'   => 'sig.png',
      'key'    => 'y',
   ),

add

   array(
      'type' => 'format',
      'title' => 'Mark text as key press',
      'icon' => '../../plugins/keyboard/keyboard.png',
      'open' => '<key>',
      'close' => '</key>',
   ),

More key name substitutions & translations