From: Mischa POSLAWSKY
Date: Wed, 4 Feb 2015 00:25:45 +0000 (+0100)
Subject: keys: drop ascii support
X-Git-Tag: v1.6~27
X-Git-Url: http://git.shiar.nl/sheet.git/commitdiff_plain/881b4a69e47004c59f35979620b65fd3d4aaaf16
keys: drop ascii support
---
diff --git a/Shiar_Sheet/KeySigns.pm b/Shiar_Sheet/KeySigns.pm
index f33b224..069b8fa 100644
--- a/Shiar_Sheet/KeySigns.pm
+++ b/Shiar_Sheet/KeySigns.pm
@@ -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 => 'â²',
diff --git a/common.inc.plp b/common.inc.plp
index 1e3f30a..4bf28bf 100644
--- a/common.inc.plp
+++ b/common.inc.plp
@@ -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
$meta->{version}
- created by Shiar $sep
+ created by Shiar $sign{sep}
AGPLv3
diff --git a/keyboard.plp b/keyboard.plp
index 672b214..3628ac3 100644
--- a/keyboard.plp
+++ b/keyboard.plp
@@ -95,9 +95,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' :>
diff --git a/keys.inc.pl b/keys.inc.pl
index 1cb8536..aad7b71 100644
--- a/keys.inc.pl
+++ b/keys.inc.pl
@@ -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 => [[
diff --git a/less.plp b/less.plp
index f701ca8..8d88a91 100644
--- 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]);
- 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' :>
diff --git a/mplayer.plp b/mplayer.plp
index 5b53ded..93d1d69 100644
--- a/mplayer.plp
+++ b/mplayer.plp
@@ -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]);
- 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' :>
diff --git a/mutt.plp b/mutt.plp
index 62c2fc1..c489f16 100644
--- 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});
- 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' :>
diff --git a/nethack.plp b/nethack.plp
index add0370..7a317a8 100644
--- a/nethack.plp
+++ b/nethack.plp
@@ -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]);
- 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' :>
diff --git a/readline.inc.pl b/readline.inc.pl
index 598d652..c68488e 100644
--- a/readline.inc.pl
+++ b/readline.inc.pl
@@ -80,7 +80,7 @@ use utf8;
},
'^x' => {
- lead => $ascii ? "'x" : "xÌ",
+ lead => "xÌ",
"\e" => ['mv mode', '+'],
diff --git a/readline.plp b/readline.plp
index 9c7c027..0118daa 100644
--- a/readline.plp
+++ b/readline.plp
@@ -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]);
- 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' :>
diff --git a/screen.plp b/screen.plp
index f4ceecb..02673ad 100644
--- a/screen.plp
+++ b/screen.plp
@@ -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});
- 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' :><:=
!defined $showkeys && ' by default' :>
diff --git a/starcraft.plp b/starcraft.plp
index 386bf40..7da0ed2 100644
--- a/starcraft.plp
+++ b/starcraft.plp
@@ -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";
:>
@@ -96,9 +96,6 @@ $keys->print_rows($get{rows} || '1 =P1 Z1', [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' :>
diff --git a/vi.inc.pl b/vi.inc.pl
index d0c259f..e749e91 100644
--- 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 e3cd1e8..5106fee 100644
--- 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});
- 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' :><:=
!defined $showkeys && ' by default' :>
diff --git a/vimperator.plp b/vimperator.plp
index 3493d84..7d1b81c 100644
--- a/vimperator.plp
+++ b/vimperator.plp
@@ -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});
- 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' :>