X-Git-Url: http://git.shiar.net/sheet.git/blobdiff_plain/544153ced65dfca53ea9195c548db7bc0fa71d71..c5df9b21d316da6e6a82feff54be042f503f381d:/keyboard.plp
diff --git a/keyboard.plp b/keyboard.plp
index 588aedc..9fd00fe 100644
--- a/keyboard.plp
+++ b/keyboard.plp
@@ -1,28 +1,13 @@
<(common.inc.plp)><:
- our $VERSION = 'v1.0';
- use Shiar_Sheet::KeySigns qw(%sign);
-
-:>
-
+Html({
+ title => 'keyboard cheat sheet',
+ version => 'v1.0',
+ stylesheet => [qw'light dark circus mono red terse'],
+ keys => 1,
+});
-
-
-keyboard cheat sheet
-<:= stylesheet(qw'light dark circus mono red terse') :>
-
-<:
- our $showkeys = exists $get{keys} && $get{keys} ne '0';
- print "\n".''
- unless $showkeys;
- print "\n".''
- if $showkeys and $get{keys} eq 'ghost';
:>
-
-
-
-
keyboard cheat sheet
normal mode (default)
@@ -38,8 +23,9 @@
<:
our %sign;
-use Shiar_Sheet::Keyboard;
+use Shiar_Sheet::Keyboard 2;
my $usint = [
+ [ 'a' .. 'z'],
[qw(à B ¢ à à F G H à J Šà µ à à à à ® § à à V Ã
X Ã Ã)],
[qw(á b © ð é f g h à j Šø µ ñ ó ö ä ® à þ ú v å x ü æ)],
[qw(Ã
ı à ð ´ Ì Ë Ì£ Ë Â½  à ¾ Ë Ã â Å â° / Ë Â¨ â â Ë Â¼ ¸)],
@@ -47,12 +33,17 @@ my $usint = [
];
my $keys = Shiar_Sheet::Keyboard->new({
- '' => {
+ def => {
+ '' => {
+ map { $_ => [''] } @{ $usint->[0] }
+ },
+ },
+ key => {
map {
my $i = ord($_) - ord('a');
- $_ => ["$usint->[0]->[$i]
$usint->[1]->[$i]"]
+ $_ => ["$usint->[1]->[$i]
$usint->[2]->[$i]"]
} 'a'..'z'
- }
+ },
});
$keys->map($get{map}) or undef $get{map};
$keys->print_rows($get{rows}, [0]);
@@ -89,9 +80,6 @@ $keys->print_rows($get{rows}, [0]);
- keyboard map is
<:= $get{map} ? 'set to ' : '' :><:= $keys->{map} :>
-
- ascii mode is
- <:= defined $sign{-ascii} && 'forced ' :><:=
- $sign{-ascii} ? 'on' : 'off' :>
- keys are
<:= $showkeys ? 'always shown' : 'hidden if unassigned' :><:=
!exists $get{keys} && ' by default' :>
@@ -101,14 +89,3 @@ $keys->print_rows($get{rows}, [0]);
-
-
-