KeyBoarder automatically converts textual references of keyboard shortcuts into graphical representations. The process is fast, the javascript-codebase small and independent of other libraries (such as jQuery), allowing to keep overhead to minimum when necessary.
The idea behind KeyBoarder is that updating past or upcoming documents with markup just for rendering shortcut-keys is inflexible and tedious. When an update would require editing hundreds of blog articles or dozens of documents, or recompiling documentation libraries, KeyBoarder is the solution.
Additionally, KeyBoarder seeks to enable easy event binding for the dynamically created shortcut keys. A default event-binder enables jumping from shortcut to shortcut by pressing the respective key of the shortcut. KeyBoarder provides three things:
Design:
choose from a multitude of asthetic design options
Interactivity:
navigate shortcuts by their respective key
Dynamic rendering:
no need to mess up documents with static markup
KeyBoarder Details: KeyBoarder takes as configuration arguments the className of the HTML elements containing the content to be outlined (e.g. in blog posts this is often 'content'). Several other options are available, and explained within the javascript-file.
From the design perspective, KeyBoarder features several beautiful styles to choose from. As such KeyBoarder can also be used as a CSS-design library.
BASE MODERN Fancy Dark LightSimple
BASE MODERN Fancy Dark LightSimple
Interactivity: Upon pressing a key which is part of a rendered shortcut, KeyBoarder will highlight and focus the key-shortcut, and advance with each further press to the next matching shortcut.
Keys can be bound to other events (e.g. the mousewheel), and/or rendered individually on per key-class basis. Designing is simpe, by assigning CSS-classes (e.g. .kbCTRL {...} ).
Dynamic Rendering recognizes textual shortcuts and outlines the matched shortcuts in markup code. The process requires shortcuts to conform to certain text conventions: UPPERCASE or Startcase keys, concatenated by a symbol e.g. '+', '-' or '~', 'and'....
A lower limit can be set on the number of consecutive keys that must be present, in order for shortcut rendering to take place. e.g. rendering ALT+X but not ALT
Note: KeyBoarder uses the HTML kbd element by default, allowing device specific treatment by the browse of the enduser.
Examples for writing Key-shortcuts that KeyBoarder recognizes:
This is a simple shortcut ALT+WIN+U
The presentation mode can be started by: ALT + WIN+ P /*this is fine!*/
somewhere in the text, ALT + RETURN - a key shortcut!
...in order to enter the text press, STRG+ ENTER
you can set different styles in preformatted tex
For demonstration, provided is an excerpt of the shortcut key table for Open Office Writer:
Shortcut Keys
Effect
Ctrl+A
Select All.
Ctrl+J
Justify.
Ctrl+D
Double Underline.
Ctrl+E
Centred.
Ctrl+F
Find and Replace.
Ctrl+Shift+P
Superscript.
Ctrl+L
Align Left.
Ctrl+R
Align Right.
Ctrl+Shift+B
Subscript.
Ctrl+Y
Redo last action.
Ctrl+0 (zero)
Apply Default paragraph style.
Ctrl+1
Apply Heading 1 paragraph style.
Ctrl+2
Apply Heading 2 paragraph style.
Ctrl+3
Apply Heading 3 paragraph style.
Ctrl+5
1.5 Line Spacing.
Ctrl+Enter
Manual page break.
Ctrl+Shift+Enter
Column break in multi-columnar texts.
Alt+Enter
Inserting a new paragraph without numbering.
Alt+Enter
Inserting a new paragraph directly before or after a section or a table.
In the example above CTRL is styled individually by defining the css-key class:
.kbCTRL { text-decoration:overline; font-weight:bold;}
Keys can be nested:
STRG - ALT - DEL //Single key reconition mode is set, thus the last key 'Del' is recognized but not the others, as the current concatenator symbol is set to '+' STRG+ WIN+O STRG+P+D WIN T , or RETURN X should not be rendered CTRL+ALT+O fsf asdfdsf
When Keys are not rendered:
In the following examples, keys will not be rendered due to varrying issues (with KeyBoarder v.7 most are rendered):
STRG - ALT - DEL //Without single key reconition mode, this text will not be rendered, since the concatenation-symbol in this example is set to '+'
"ALT + DEL"
CTRL+ALT - DEL //Del is not part of the shortcut, // since '-' is not set as a concatenation symbol
,ALT+DEL",
press the following combination
ALT+I, / ALT+X,
Misc Notes:
Quickly determine a keyCode with just one line of code, - in case the key-mappings do not match the most common keyboard layout of your audience. Click in the box and press a key. Once letting go of the key, the keyCode value will be written into the box. To implement this in your own site, use the following code: