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

my %win = (
	'`' => '¦',
	'~' => "\N{COMBINING GRAVE ACCENT}", # uk ¬ originally unshifted
	'2' => "\N{COMBINING DIAERESIS}",
	'4' => '€',
	'6' => "\N{COMBINING CIRCUMFLEX ACCENT}",
	'W' => 'Ẃ',
	'w' => 'ẃ',
	'E' => 'É',
	'e' => 'é',
	'Y' => 'Ý',
	'y' => 'ý',
	'U' => 'Ú',
	'u' => 'ú',
	'I' => 'Í',
	'i' => 'í',
	'O' => 'Ó',
	'o' => 'ó',
	'A' => 'Á',
	'a' => 'á',
	#'"' => '`',
	"'" => "\N{COMBINING ACUTE ACCENT}",
	'\\'=> "\N{COMBINING TILDE}", # uk #
	'C' => 'Ç',
	'c' => 'ç',
);

my %dup = (
	# aliases to unmodified keys
	'7' => '{',
	'8' => '[',
	'9' => ']',
	'0' => '}',
	'-' => '\\',
	'q' => '@',
	'K' => '&',
);

my %rows = (%win, %dup,
	'!' => '¡',
	'1' => '¹',
	'@' => '½', # uk "
	'#' => '⅓', # uk £
	'3' => '³',
	'$' => '¼',
	'%' => '⅜',
	'5' => \'@',
	'^' => '⅝',
	'&' => '⅞',
	'*' => '™',
	'(' => '±',
	')' => '°',
	'_' => '¿',
	'+' => "\N{COMBINING OGONEK}",
	'=' => "\N{COMBINING CEDILLA}",
	'Q' => 'Ω',
	'R' => '®',
	'r' => '¶',
	'T' => 'Ŧ',
	't' => 'ŧ',
	'P' => 'Þ',
	'p' => 'þ',
	'{' => "\N{COMBINING RING ABOVE}",
	'}' => "\N{COMBINING MACRON}", # originally |
	'[' => \'2',
	']' => \'\\',
	'S' => '§',
	's' => 'ß',
	'D' => 'Ð',
	'd' => 'ð',
	'F' => 'ª',
	'f' => 'đ',
	'G' => 'Ŋ',
	'g' => 'ŋ',
	'H' => 'Ħ',
	'h' => 'ħ',
	'J' => "\N{COMBINING HORN}",
	'j' => "\N{COMBINING HOOK ABOVE}",
	'k' => 'ĸ',
	'L' => 'Ł',
	'l' => 'ł',
	':' => "\N{COMBINING DOUBLE ACUTE ACCENT}",
	';' => \"'",
	'"' => "\N{COMBINING CARON}", # uk @
	'|' => "\N{COMBINING BREVE}", # uk ~ originally \
	'Z' => '‹',
	'z' => '«',
	'X' => '›',
	'x' => '»',
	'V' => '‘',
	'v' => '“',
	'B' => '’',
	'b' => '”',
	#'N'=> 'N',
	#'n'=> 'n',
	'M' => 'º',
	'm' => 'µ',
	'<' => '×',
	',' => '─',
	'>' => '÷',
	'.' => '·',
	'?' => "\N{COMBINING DOT ABOVE}",
	'/' => "\N{COMBINING DOT BELOW}",
);

my $groups = kbchars(\%rows);

$_->[0] .= ' ext'  for @{ $groups->{def}{''} }{keys %dup};
$_->[0] .= ' more' for @{ $groups->{def}{''} }{keys %win};
$groups->{flag}{more} = ['windows', "only a small subset is present on Microsoft's layout"];

+{
	%{$groups},
	title => 'UK-extended',
	category => 'latin/thirdparty',
	version => '1.1',
	intro => join("\n",
		"A Chrome OS extension and Xorg option",
		"expanding on Windows' UK Extended QWERTY keyboard.",
		'Distinct from the <a href="/keyboard/altgr/windows">US international</a> variant.',
	),
	description => [
		"Google UK-Extended keyboard layout table for Chrome OS",
		"with the AltGr modifier key.",
	],
	image => 'data/keyboard/thumb/chromebook-hp11.jpg',
	imagealt => 'AltGr key on a HP Chromebook 11 G2',
}
