split off common keys display to Shiar_Sheet::Keyboard
authorMischa POSLAWSKY <perl@shiar.org>
Mon, 5 Jan 2009 21:48:48 +0000 (21:48 +0000)
committerMischa POSLAWSKY <perl@shiar.org>
Tue, 6 Jan 2009 23:59:47 +0000 (23:59 +0000)
commita84b651b70f484379de8ac84a2abac91e59c1a6e
tree85b284c0ef05fc09c8d7c957e1333e93dc4d7f08
parent41c3aa4f3f9017f7d5933ec3e3535124a2b4e6f6
split off common keys display to Shiar_Sheet::Keyboard

Modularize the vim.plp code to generate HTML showing a keyboard sheet.
This allows the code to be reused on other pages (non-vim key sheets).
Besides using an object (instead of global variables) to store specific
data, nothing much should have changed.

The only exception is that $ascii is unavailable at keyboard
initialization (do 'keys.inc.pl'), so key characters are always unicode.
This is only relevant for "foreign" layouts, for which users are
expected to have Unicode-capable environments anyway, so it doesn't
seem an important issue.  It could be solved by loading the map only
at object creation, but this is faster for persistent servers.
Shiar_Sheet/Keyboard.pm [new file with mode: 0644]
keys.inc.pl [moved from vim-keys.inc.pl with 100% similarity]
vim.inc.pl [moved from vim-cmds.inc.pl with 100% similarity]
vim.plp