use utf8;
use strict;
use warnings;
no warnings 'qw';
use Shiar_Sheet::KeyboardChars 'kbchars';

my %rows = (
	's' => '┼',  # 80
	'x' => '┴',  # 81
	'w' => '┬',  # 82
	'd' => '┤',  # 83
	'a' => '├',  # 84
	't' => '─',  # 85
	'r' => '│',  # 86
	'q' => '┌',  # 87
	'e' => '┐',  # 88
	'z' => '└',  # 89
	'c' => '┘',  # 8A
	'j' => '▒',  # 8B
	'f' => '█',  # 8C
	'g' => '▄',  # 8D
	'h' => '▌',  # 8E
	'y' => '●',  # 8F

	'u' => '○',  # 90
	'i' => '♠',  # 91
	'o' => '♥',  # 92
	'p' => '♦',  # 93
	'[' => '♣',  # 94
	'k' => '♪',  # 95 "little musical note"
	'v' => '☎',  # 96 "tiny telephone"
	',' => '🛧',  # 97 airplane (✈ up)
	'm' => '🚗', # 98 "subcompact car" (left)
	'n' => '🍷', # 99 U̝ thing: tuning fork ⑂? glass 🍷? insert ⁁? alchemy ⨿?
	'b' => '🯈',  # 9A "small person" 🕺 (running left)
	';' => '↑',  # 9B
	'.' => '↓',  # 9C
	"'" => '×',  # 9D
	'/' => '÷',  # 9E
	'l' => '±',  # 9F

	# characters in european font
	#à°ç§éùè¨ÄÖÜäöüßÆØÅæøåÉ¤

	qw(
		! 1 @ 2 # 3 $ 4 % 5 ^ 6
		& 7  * 8  ( 9  ) 0  _ - + ^
		U 4  I 5  O 6       { ?
		J 1  K 2  L 3  : +  " *
		M 0  < ,  > .  ? /
	),
);

my $groups = kbchars(\%rows);

while (my ($k, $c) = each %rows) {
	$groups->{def}{''}{$k}[0] = (
		0 ? 'g9' :
		$c =~ /\p{In=1.1}/ ? 'g2' :
		$c =~ /\p{In=4.0}/ ? 'g3' :
		$c =~ /[\x{1FB00}-\x{1FBFF}]/ ? 'g5' : # Age=V13.0
		'g0'
	);
}

+{
	%{ $groups },
	version => '1.0',
	title => 'Epson PX-20 graphics',
	category => 'legacy/graph',
	moderows => '1-',
	intro => join("\n",
		'Unicode glyphs similar to the <em>graph</em> mode of the 1981',
		'Epson HC-20 and later (PX-8 Geneva, PX-4) laptops.',
		'See also <a href="/keyboard/altgr/msx-graph">MSX</a>,',
		'<a href="/keyboard/altgr/atari">Atari</a>,',
		'<a href="/keyboard/altgr/c64">C-64</a>, and',
		'<a href="/keyboard/altgr/unigraph">modern Unicode</a>.',
	),
	flag => {
		g2 => ['standard' => 'original Unicode 1993'],
		g3 => ['extended' => 'Unicode 4.0'],
		g5 => ['legacy'   => 'exceptional <em>symbols for legacy computing</em> in Unicode since <abbr title="Unicode 13.0">2020</abbr>'],
	},
}
