The following are the list of customizations for Shortwiki to have Keypress style of Wikipedia. These should probably be checked into a source control, but I just started working on this project, and MediaWiki, so I’m just jotting down some notes. I’ll organize theses more after I get a feeling of how MediaWiki work.

1. Put the following in skins/common/commonElements.css

kbd {
    border: 1px solid #aaa;
    -moz-border-radius: 0.2em;
    -webkit-border-radius: 0.2em;
    border-radius: 0.2em;
    -moz-box-shadow: 0.1em 0.2em 0.2em #ddd;
    -webkit-box-shadow: 0.1em 0.2em 0.2em #ddd;
    box-shadow: 0.1em 0.2em 0.2em #ddd;
    background-color: #f9f9f9;
    background-image: -moz-linear-gradient(top, #eee, #f9f9f9, #eee);
    background-image: -o-linear-gradient(top, #eee, #f9f9f9, #eee);
    background-image: -webkit-linear-gradient(top, #eee, #f9f9f9, #eee);
    background-image: linear-gradient(to bottom, #eee, #f9f9f9, #eee);
    padding: 0.1em 0.3em;
    font-family: inherit;
    font-size: 0.85em;
}

Note: this is the style of Keyboard keys used in Wikipedia.

2. Copy the following pages from Wikipedia:

  • Template:Unicode
  • Template:Key press
  • Template:Key press/core
  • Template:Documentation

3. Redirect page Template:Keypress to Template:Key press

4. Enable ParserFunctions extension by adding the following to LocalSettings.php

require_once("$IP/extensions/ParserFunctions/ParserFunctions.php");

References:

  1. How to include Keypress in wiki
  2. Help:Extension:ParserFunctions