keys: drop ascii support
authorMischa POSLAWSKY <perl@shiar.org>
Wed, 4 Feb 2015 00:25:45 +0000 (01:25 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Thu, 5 Feb 2015 21:46:21 +0000 (22:46 +0100)
15 files changed:
Shiar_Sheet/KeySigns.pm
common.inc.plp
keyboard.plp
keys.inc.pl
less.plp
mplayer.plp
mutt.plp
nethack.plp
readline.inc.pl
readline.plp
screen.plp
starcraft.plp
vi.inc.pl
vi.plp
vimperator.plp

index f33b224d10df602e9b1583e3790974f28c50f739..069b8fa732220bd9c459c1afff85fa6a28cf26f5 100644 (file)
@@ -4,14 +4,12 @@ use utf8;
 use strict;
 use warnings;
 
-our $VERSION = 'v1.01';
+our $VERSION = 'v1.02';
 
 sub import {
        my $class = shift;
 
        my %sign = (
-               -ascii => 0,
-               charset=> 'utf-8',
                arg    => '·',  # described as 'dot'
                args   => '⁚',
                argi   => '′',
index 1e3f30a9dd38d97586b78b88b3c071b48d9d2a32..4bf28bf5f0f95f4dc4df231e379b371e21330ba6 100644 (file)
@@ -8,7 +8,7 @@ use open ':std' => ':utf8';
 
 use File::stat 'stat';
 use HTTP::Date;
-use Shiar_Sheet::KeySigns qw(%sign);  # dependant on $get{ascii}
+use Shiar_Sheet::KeySigns qw(%sign);
 
 our $style;
 our $showkeys = !exists $get{keys} ? undef :
@@ -87,7 +87,6 @@ sub Html {
        ref $_ eq 'ARRAY' and $_ = stylesheet(@$_)."\n" for $meta->{stylesheet};
 
        # other vars
-       my $sep = $meta->{charset} eq 'utf-8' ? '•' : ' -- ';
        my ($file) = $ENV{SCRIPT_FILENAME} =~ m{ ([^/]+) \.plp$ }x;
 
        # leading output
@@ -116,7 +115,7 @@ EOT
         rel="code" title="Written in Perl">plp</a>
        <a href="http://git.shiar.nl/sheet.git/history/HEAD:/$file.plp"
         rel="vcs-git" title="Git repository">$meta->{version}</a>
-       created by <a href="http://shiar.nl/" rel="author">Shiar</a> $sep
+       created by <a href="http://shiar.nl/" rel="author">Shiar</a> $sign{sep}
        <a href="http://www.fsf.org/licensing/licenses/agpl-3.0.html" rel="copyright"
         title="Licensed under the GNU Affero General Public License, version 3">AGPLv3</a>
 </p>
index 672b2143b1c34395963b4629aecc8d9a7c982ba0..3628ac32aebecf64d5975927a232feeb6c974c63 100644 (file)
@@ -95,9 +95,6 @@ $keys->print_rows($get{rows}, [0]);
                <ul class="legend legend-set">
                <li>keyboard <strong>map</strong> is
                        <:= $get{map} ? 'set to ' : '' :><em><:= $keys->{map} :></em>
-               <li><strong>ascii</strong> mode is
-                       <:= defined $sign{-ascii} && 'forced ' :><em><:=
-                               $sign{-ascii} ? 'on' : 'off' :></em>
                <li><strong>keys</strong> are
                        <em><:= $showkeys ? 'always shown' : 'hidden if unassigned' :></em><:=
                                !exists $get{keys} && ' by default' :>
index 1cb8536d19ba986bba8755aa5d64e4921829589b..aad7b71fb8a01fa6fd77b1ec9e3a578abe8bda06 100644 (file)
@@ -38,19 +38,19 @@ qwerty => [[
 ]],
 
 qwertz => [[
-       [qw/ ^  1  2  3  4  5  6  7  8  9  0 /, $ascii ? ('ss', '^0') : ('ß', '´') ],
-       [$ascii ? '^0' : '°', qw{ !  " }, $ascii ? '^0' : '§', qw{ $  %  &  /  (  )  =  ?  ` }],
-       [qw/^^ ^0 ^0 ^0 ^0 ^0 ^0  {  [  ]  }              \\         ^0 /],
-#      [qw{ °  !  "  §  $  %  &  /  (  )  =               ?          ` }],
-], [
-       [qw/ q  w  e  r  t  z  u  i  o  p /, $ascii ? 'ue' : 'ü', '+' ],
-       [qw/ Q  W  E  R  T  Z  U  I  O  P /, $ascii ? 'UE' : 'Ü', '*' ],
-       [qw/ @ ^w ^e ^r ^t ^z ^u ^i ^o ^p              ^0     ~      /],
+       [qw/ ^  1  2  3  4  5  6  7  8  9  0  ß  ´ /],
+       [qw{ °  !  "  §  $  %  &  /  (  )  =  ?  ` }],
+       [qw/^^ ^0 ^0 ^0 ^0 ^0 ^0  {  [  ]  } \\ ^0 /],
+#      [qw{ °  !  "  §  $  %  &  /  (  )  =  ?  ` }],
+], [
+       [qw/ q  w  e  r  t  z  u  i  o  p  ü  + /],
+       [qw/ Q  W  E  R  T  Z  U  I  O  P  Ü  * /],
+       [qw/ @ ^w ^e ^r ^t ^z ^u ^i ^o ^p ^0  ~ /],
        #    ^ show altgr-Q instead
 ], [
-       [qw/ a  s  d  f  g  h  j  k  l /, $ascii ? ('oe', 'ae') : ('ö', 'ä'), '#' ],
-       [qw/ A  S  D  F  G  H  J  K  L /, $ascii ? ('OE', 'AE') : ('Ö', 'Ä'), "'" ],
-       [qw/^a ^s ^d ^f ^g ^h ^j ^k ^l               ^0    ^0                 ^0 /],
+       [qw/ a  s  d  f  g  h  j  k  l  ö  ä  # /],
+       [qw/ A  S  D  F  G  H  J  K  L  Ö  Ä  ' /],
+       [qw/^a ^s ^d ^f ^g ^h ^j ^k ^l ^0 ^0 ^0 /],
 ], [
        [qw/ y  x  c  v  b  n  m  ,  .  -  < /],
        [qw/ Y  X  C  V  B  N  M  ;  :  _  > /],
@@ -58,22 +58,22 @@ qwertz => [[
 ]],
 
 azerty => [[
-       [qw/  <  & /, $ascii ? 'e\'' : 'é', qw/ "  '  (  - ^_  _ /, $ascii ? 'c,' : 'ç', qw/ @  )  = /],
+       [qw/  <  &  é  "  '  (  - ^_  _  ç  @  )  = /],
        [qw/  >  1  2  3  4 ^[  6  7  8  9  0 ^]  + /], # 5 unused atm
 #      [qw/  <  &  é  "  '  (  - ^_  _  ç  @  )  = /], # à→@→^@, è→^_
        [qw/^\\ ^0  ~  #  {  [  |  ` \\ ^0 ^@  ]  } /], # °→^]
 ], [
        [qw/ a  z  e  r  t  y  u  i  o  p  ^  $ /],
-       [qw/ A  Z  E  R  T  Y  U  I  O  P /, $ascii ? (":'", 'Pd') : ('¨', '£')],
-       [qw/^a ^z ^e ^r ^t ^y ^u ^i ^o ^p ^^ /, $ascii ? 'Cu' : '¤'],
+       [qw/ A  Z  E  R  T  Y  U  I  O  P  ¨  £ /],
+       [qw/^a ^z ^e ^r ^t ^y ^u ^i ^o ^p ^^  ¤ /],
 ], [
-       [qw/ q  s  d  f  g  h  j  k  l  m /, $ascii ? 'u!' : 'ù', '*'],
-       [qw/ Q  S  D  F  G  H  J  K  L  M /, '%', $ascii ? 'My' : 'µ'],
+       [qw/ q  s  d  f  g  h  j  k  l  m  ù  * /],
+       [qw/ Q  S  D  F  G  H  J  K  L  M  %  µ /],
        [qw/^q ^s ^d ^f ^g ^h ^j ^k ^l ^m ^0 ^0 /],
 ], [
-       [qw( w  x  c  v  b  n  ,  ;  :                     ! )],
-       [qw( W  X  C  V  B  N  ?  .  / ), $ascii ? 'SE' : '§' ],
-       [qw(^w ^x ^c ^v ^b ^n ^? ^0 ^0                    ^0 )],
+       [qw( w  x  c  v  b  n  ,  ;  :  ! )],
+       [qw( W  X  C  V  B  N  ?  .  /  § )],
+       [qw(^w ^x ^c ^v ^b ^n ^? ^0 ^0 ^0 )],
 ]],
 
 arensito => [[
index f701ca8f3434e67bc9f3dcbe4e8fe4d5947be909..8d88a91b99a7fdfcc3ead469abddb5576fbbd386 100644 (file)
--- a/less.plp
+++ b/less.plp
@@ -11,7 +11,6 @@ Html({
                less sheet cheat keys pager more
                shortkey reference keyboard commands options overview
        '],
-       charset => $sign{charset},
        stylesheet => [qw'light dark circus mono red terse'],
        keys => 1,
 });
@@ -43,9 +42,6 @@ $keys->print_rows($get{rows}, [1,0]);
                <ul class="legend legend-set">
                <li>keyboard <strong>map</strong> is
                        <:= $get{map} ? 'set to ' : '' :><em><:= $keys->{map} :></em>
-               <li><strong>ascii</strong> mode is
-                       <:= defined $sign{-ascii} && 'forced ' :><em><:=
-                               $sign{-ascii} ? 'on' : 'off' :></em>
                <li><strong>keys</strong> are
                        <em><:= $showkeys ? 'always shown' : 'hidden if unassigned' :></em><:=
                                !exists $get{keys} && ' by default' :>
index 5b53ded991f856e06bb97ae384d3cae90928af94..93d1d698d3e59260f1003ff0ae459fe455ede126 100644 (file)
@@ -10,7 +10,6 @@ Html({
        keywords => [qw'
                mplayer video media sheet cheat reference overview control shortkey keyboard
        '],
-       charset => $sign{charset},
        stylesheet => [qw'light dark circus mono red terse'],
        keys => 1,
 });
@@ -42,9 +41,6 @@ $keys->print_rows($get{rows}, [1,0]);
                <ul class="legend legend-set">
                <li>keyboard <strong>map</strong> is
                        <:= $get{map} ? 'set to ' : '' :><em><:= $keys->{map} :></em>
-               <li><strong>ascii</strong> mode is
-                       <:= defined $sign{-ascii} && 'forced ' :><em><:=
-                               $sign{-ascii} ? 'on' : 'off' :></em>
                <li><strong>keys</strong> are
                        <em><:= $showkeys ? 'always shown' : 'hidden if unassigned' :></em><:=
                                !exists $get{keys} && ' by default' :>
index 62c2fc11451dc0a1ae04149a44d3fb67dbffeb66..c489f1664ba3ce5be03e4819f03e8662a34a6fc7 100644 (file)
--- a/mutt.plp
+++ b/mutt.plp
@@ -10,7 +10,6 @@ Html({
        keywords => [qw'
                mutt MUA email client sheet cheat reference overview commands keyboard
        '],
-       charset => $sign{charset},
        stylesheet => [qw'light dark circus mono red terse'],
        keys => 1,
 });
@@ -42,9 +41,6 @@ $keys->print_rows($get{rows});
                <ul class="legend legend-set">
                <li>keyboard <strong>map</strong> is
                        <:= $get{map} ? 'set to ' : '' :><em><:= $keys->{map} :></em>
-               <li><strong>ascii</strong> mode is
-                       <:= defined $sign{-ascii} && 'forced ' :><em><:=
-                               $sign{-ascii} ? 'on' : 'off' :></em>
                <li><strong>keys</strong> are
                        <em><:= $showkeys ? 'always shown' : 'hidden if unassigned' :></em><:=
                                !exists $get{keys} && ' by default' :>
index add03706c0d5a0b04645f98af9e885d8752421b9..7a317a88672d3528c553695981e86a4095f743b2 100644 (file)
@@ -10,7 +10,6 @@ Html({
        keywords => [qw'
                nethack rogue game control controls sheet reference overview keyboard
        '],
-       charset => $sign{charset},
        stylesheet => [qw'light dark circus mono red terse'],
        keys => 1,
 });
@@ -44,9 +43,6 @@ $keys->print_rows($get{rows} || '4321-421', [3,2,1,0]);
                <ul class="legend legend-set">
                <li>keyboard <strong>map</strong> is
                        <:= $get{map} ? 'set to ' : '' :><em><:= $keys->{map} :></em>
-               <li><strong>ascii</strong> mode is
-                       <:= defined $sign{-ascii} && 'forced ' :><em><:=
-                               $sign{-ascii} ? 'on' : 'off' :></em>
                <li><strong>keys</strong> are
                        <em><:= $showkeys ? 'always shown' : 'hidden if unassigned' :></em><:=
                                !exists $get{keys} && ' by default' :>
index 598d652f3fa9ef8f226bc91c12ac5078e604cc3d..c68488eb1d8728951464690588e1d5718b5d0c88 100644 (file)
@@ -80,7 +80,7 @@ use utf8;
 },
 
 '^x' => {
-       lead => $ascii ? "'x"  : "x̂",
+       lead => "x̂",
 
        "\e" => ['mv mode', '+'],
 
index 9c7c027a8c68754fa886d2a929d5d399b9a47993..0118daa862555b35107b6e8ba8afb87c88f9c196 100644 (file)
@@ -10,7 +10,6 @@ Html({
        keywords => [qw'
                readline gnu bash emacs sheet cheat reference overview keyboard editing curses
        '],
-       charset => $sign{charset},
        stylesheet => [qw'light dark circus mono red terse'],
        keys => 1,
 });
@@ -42,9 +41,6 @@ $keys->print_rows($get{rows} || '^x=213', [4,3,2]);
                <ul class="legend legend-set">
                <li>keyboard <strong>map</strong> is
                        <:= $get{map} ? 'set to ' : '' :><em><:= $keys->{map} :></em>
-               <li><strong>ascii</strong> mode is
-                       <:= defined $sign{-ascii} && 'forced ' :><em><:=
-                               $sign{-ascii} ? 'on' : 'off' :></em>
                <li><strong>keys</strong> are
                        <em><:= $showkeys ? 'always shown' : 'hidden if unassigned' :></em><:=
                                !exists $get{keys} && ' by default' :>
index f4ceecb08416fcd136b8dc2fb1a1f151396f97d3..02673ad168ecdb770b10ba265f216ee3a02d6a03 100644 (file)
@@ -11,7 +11,6 @@ Html({
                screen sheet cheat reference overview commands keyboard
                terminal window manager
        '],
-       charset => $sign{charset},
        stylesheet => [qw'light dark circus mono red terse'],
        keys => 1,
 });
@@ -46,9 +45,6 @@ $keys->print_rows($get{rows});
                <ul class="legend legend-set">
                <li>keyboard <strong>map</strong> is
                        <:= $get{map} ? 'set to ' : '' :><em><:= $keys->{map} :></em>
-               <li><strong>ascii</strong> mode is
-                       <:= defined $sign{-ascii} && 'forced ' :><em><:=
-                               $sign{-ascii} ? 'on' : 'off' :></em>
                <li><strong>keys</strong> are
                        <em><:= $showkeys ? 'always shown' : 'hidden if unassigned' :></em><:=
                                !defined $showkeys && ' by default' :>
index 386bf4031763492b7a22450255e356f0f4a385a7..7da0ed211f703a3348cc2164436d3b1875784819 100644 (file)
@@ -9,7 +9,7 @@ use Shiar_Sheet::KeySigns qw(%sign);
 
 our $VERSION = 'v1.0';
 
-$header{content_type} = "text/html; charset=$sign{charset}";
+$header{content_type} = "text/html; charset=utf-8";
 
 :><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  "http://www.w3.org/TR/html4/loose.dtd">
@@ -96,9 +96,6 @@ $keys->print_rows($get{rows} || '1 =P1 Z1', [0]);
                <ul class="legend legend-set">
                <li>keyboard <strong>map</strong> is
                        <:= $get{map} ? 'set to ' : '' :><em><:= $keys->{map} :></em>
-               <li><strong>ascii</strong> mode is
-                       <:= defined $sign{-ascii} && 'forced ' :><em><:=
-                               $sign{-ascii} ? 'on' : 'off' :></em>
                <li><strong>keys</strong> are
                        <em><:= $showkeys ? 'always shown' : 'hidden if unassigned' :></em><:=
                                !exists $get{keys} && ' by default' :>
index d0c259fc39ae8738aabd1bb1510083e94f2eef26..e749e91e3ae9795e346d47aa8563b7e60d54e642 100644 (file)
--- a/vi.inc.pl
+++ b/vi.inc.pl
@@ -309,7 +309,7 @@ z => {
 }, # mode ]
 
 '^w' => {
-       lead => $ascii ? "'w"  : "ŵ",
+       lead => "ŵ",
 
        "\e"=> ["mo mode"],
 
@@ -359,7 +359,7 @@ z => {
 }, # mode ^w
 
 '^wg' => {
-       lead => $ascii ? "'wg" : "ŵg",
+       lead => "ŵg",
 
        "\e"=> ["mo mode"],
        '^['=> "\e",
@@ -528,7 +528,7 @@ i => {
 }, # modei
 
 'i^g' => {
-       lead => $ascii ? "'g"  : "ĝ",
+       lead => "ĝ",
 
        "\e"=> ['mi modei'],
 
@@ -539,7 +539,7 @@ i => {
 }, # mode i ^g
 
 'i^x' => {
-       lead => $ascii ? "'x"  : "x̂",
+       lead => "x̂",
 
        "\e" => ["mo mode"], # yes, it really leaves insert mode
 
diff --git a/vi.plp b/vi.plp
index e3cd1e85e68e530a87b79d1fa41eef82d0a1aa24..5106feebf3cbabadfd12b2bd59e6bb9ae33e2502 100644 (file)
--- a/vi.plp
+++ b/vi.plp
@@ -10,7 +10,6 @@ Html({
        keywords => [qw'
                vi vim nvi sheet cheat reference overview commands keyboard
        '],
-       charset => $sign{charset},
        stylesheet => [qw'light dark circus mono red terse'],
        keys => 1,
 });
@@ -46,9 +45,6 @@ $keys->print_rows($get{rows});
                <ul class="legend legend-set">
                <li>keyboard <strong>map</strong> is
                        <:= $get{map} ? 'set to ' : '' :><em><:= $keys->{map} :></em>
-               <li><strong>ascii</strong> mode is
-                       <:= defined $sign{-ascii} && 'forced ' :><em><:=
-                               $sign{-ascii} ? 'on' : 'off' :></em>
                <li><strong>keys</strong> are
                        <em><:= $showkeys ? 'always shown' : 'hidden if unassigned' :></em><:=
                                !defined $showkeys && ' by default' :>
index 3493d842775b026b51eabfb651b520918f6548c9..7d1b81c3942048d712595a0c753170cb30739666 100644 (file)
@@ -11,7 +11,6 @@ Html({
                vimperator firefox vim iceweasel sheet cheat reference overview
                commands keyboard browser
        '],
-       charset => $sign{charset},
        stylesheet => [qw'light dark circus mono red terse'],
        keys => 1,
 });
@@ -45,9 +44,6 @@ $keys->print_rows($get{rows});
                <ul class="legend legend-set">
                <li>keyboard <strong>map</strong> is
                        <:= $get{map} ? 'set to ' : '' :><em><:= $keys->{map} :></em>
-               <li><strong>ascii</strong> mode is
-                       <:= defined $sign{-ascii} && 'forced ' :><em><:=
-                               $sign{-ascii} ? 'on' : 'off' :></em>
                <li><strong>keys</strong> are
                        <em><:= $showkeys ? 'always shown' : 'hidden if unassigned' :></em><:=
                                !exists $get{keys} && ' by default' :>