X-Git-Url: http://git.shiar.net/sheet.git/blobdiff_plain/55e3fa05d6b3a641d91dc02e6c2debb1f84086b2..HEAD:/keyboard.plp diff --git a/keyboard.plp b/keyboard.plp index 9fd00fe..3a40a4d 100644 --- a/keyboard.plp +++ b/keyboard.plp @@ -1,91 +1,84 @@ <(common.inc.plp)><: -Html({ - title => 'keyboard cheat sheet', - version => 'v1.0', - stylesheet => [qw'light dark circus mono red terse'], - keys => 1, -}); +$Request ||= 'altgr/windows'; +my $mode = lc $Request; +my $include = "keyboard/$mode.eng"; -:> -

keyboard cheat sheet

+if (-e (my $page = "keyboard/$Request/index.inc.plp")) { + Include $page; + exit; +} -

normal mode (default)

+my $info = eval { Data($include) } || {}; +warn "error in $include: ", @{$@} if ref $@; +$mode = $info->{title} // $mode; - +$keys->print_rows($get{rows} || $info->{moderows}, $info->{rows}); + +{ + say "
\n"; + say '
'; + + use List::MoreUtils qw( part ); + my @gflags = part {/^g\d/} sort keys %{ $keys->{flag} }; -
+ say "\t", '
'; + $keys->print_legend('legend-types', $gflags[1]); + say "\t
\n"; -
-
-
-
info -
Info command: shows/does something without altering anything. -
motion -
positioning -
Other movement (jumps, window (re)positioning). -
command -
Direct action command. -
ins mode -
Enters Insert or Replace mode. -
mode -
Enters a different mode. -
vis mode -
Enters Visual or Select mode. -
key cmd -
Additional key commands (click for overview). -
-
+ say "\t", '
'; + $keys->print_legend('legend-options', $gflags[0]); + say ''; -
-
-
+ say "\t\t", '
    '; -
      -
    • keyboard map is - <:= $get{map} ? 'set to ' : '' :><:= $keys->{map} :> -
    • keys are - <:= $showkeys ? 'always shown' : 'hidden if unassigned' :><:= - !exists $get{keys} && ' by default' :> -
    • default style is - <:= defined $get{style} && 'set to ' :><:= $style :> -
    -
-
+ say "\t\t
  • keyboard map is ", + ($get{map} ? 'set to ' : ''), "$keys->{map}"; + say "\t\t
  • keys are ", + "", ($showkeys ? 'always shown' : 'hidden if unassigned'), "", + (!defined $showkeys && ' by default'); + say "\t\t
  • default style is ", + (defined $get{style} && 'set to '), "$style"; + say "\t\t"; + say "\t
  • \n"; + say "
    \n"; +}