X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/881b4a69e47004c59f35979620b65fd3d4aaaf16..HEAD:/keyboard.plp diff --git a/keyboard.plp b/keyboard.plp index 3628ac3..fa2aaf2 100644 --- a/keyboard.plp +++ b/keyboard.plp @@ -1,117 +1,84 @@ <(common.inc.plp)><: - our $VERSION = 'v1.0'; - use Shiar_Sheet::KeySigns qw(%sign); - -:> - - - - -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)

- - +$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} }; -
-
-
-
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-types', $gflags[1]); + say "\t
\n"; -
-
-
+ say "\t", '
'; + $keys->print_legend('legend-options', $gflags[0]); + say ''; -
    -
  • 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", '"; + say "\t
\n"; + say "
\n"; +}