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

my %rows = (
	'1' => '¡',
	'2' => '¬',
	'3' => "\N{COMBINING GRAVE ACCENT}",
	'4' => "\N{COMBINING ACUTE ACCENT}",
	'5' => "\N{COMBINING BREVE}",
	'6' => "\N{COMBINING RING ABOVE}",
	'7' => "\N{COMBINING CIRCUMFLEX ACCENT}",
	'8' => "\N{COMBINING CARON}",
	'9' => "\N{COMBINING DOT ABOVE}",
	'0' => "\N{COMBINING DIAERESIS}",
	'-' => "\N{COMBINING MACRON}",
	'=' => "\N{COMBINING TILDE}",

	'q' => 'ω',
	'Q' => 'Ω',
	'w' => 'ø',
	'W' => 'Ø',
	'e' => 'œ',
	'E' => 'Œ',
	'r' => "\N{COMBINING CEDILLA}",
	't' => "\N{COMBINING BREVE BELOW}",
	'y' => "\N{COMBINING RING BELOW}",
	'u' => "\N{COMBINING CIRCUMFLEX ACCENT BELOW}",
	'i' => "\N{COMBINING CARON BELOW}",
	'o' => "\N{COMBINING DOT BELOW}",
	'p' => "\N{COMBINING DIAERESIS BELOW}",
	'[' => "\N{COMBINING MACRON BELOW}",
	']' => "\N{COMBINING TILDE BELOW}",

	'a' => 'æ',
	'A' => 'Æ',
	's' => 'ß',
	'S' => 'ẞ',
	'd' => 'ð',
	'D' => 'Ð',
	'f' => 'þ',
	'F' => 'Þ',
	'h' => '£',
	'j' => '€',
	';' => 'º',
	':' => 'ª',
	"'" => '¤',
	'\\'=> '§',

	'c' => 'ç',
	'C' => 'Ç',
	'n' => 'ñ',
	'N' => 'Ñ',
	'm' => "\N{MICRO SIGN}",
	',' => '«',
	'.' => '»',
	'/' => '¿',
);

my %shift = (
	qw[ ! 1  @ 2  # 3  $ 4  % 5  ^ 6  & 7  * 8  ( 9  ) 0  _ -  + = ],
	qw( { [  } ]  " '  | \  < ,  > .  ? /  ` 3  ~ = ),
	(map {uc, lc} qw[ r t y u i o p  h j  m  ]),
);
$rows{$_} = $rows{ $shift{$_} } for keys %shift; # alias shifted

my $groups = kbchars(\%rows);
$groups->{flag}{ext} = ['alias', 'identical results from unshifted key'];
$groups->{def}{''}{$_} .= ' ext' for keys %shift; # mark aliases

+{
	%{ $groups },
	version => '1.0',
	title => 'OLPC',
	category => 'legacy/latin/xorg',
	intro => join("\n",
		"International US English developed for the OLPC project,",
		'providing mostly European',
		'<a href="/unicode">Unicode</a> characters while pressing AltGr,',
		'entirely different from the <a href="/keyboard/altgr/windows">Windows</a>',
		'or <a href="/keyboard/altgr/macos">MacOS</a> maps.',
	),
	description => [
		"OLPC keyboard layout table",
		"with the AltGr modifier key:",
		"provides common western European letters and symbols,",
		"and various combining accents above and below.",
	],
	image => 'data/keyboard/thumb/olpc.jpg',
	imagealt => 'AltGr on the OLPC XO Laptop',
	moderows => '21-1',
}
