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

my %rows = (
	'' => {
		'!'  => "\N{COMBINING DOT ABOVE}",
		'"'  => "\N{COMBINING DIAERESIS}",
		'#'  => "\N{COMBINING MACRON}",
		'$'  => '¥',
		'%'  => '£',
		'&'  => '‚',
		"'"  => "\N{COMBINING ACUTE ACCENT}",
		'('  => '‘',
		')'  => '’',
		'*'  => 'µ',
		'+'  => "\N{COMBINING RING ABOVE}",
		','  => "\N{COMBINING CEDILLA}",
		'-'  => '–',
		'.'  => 'œ',
		'/'  => '¿',
		'0'  => '”',
		'1'  => '¡',
		'2'  => '²',
		'3'  => '³',
		'4'  => '¢',
		'5'  => '€',
		'6'  => "\N{COMBINING CIRCUMFLEX ACCENT}",
		'7'  => '„',
		'8'  => 'ß',
		'9'  => '“',
		':'  => 'Ô',
		';'  => 'ô',
		'<'  => "\N{COMBINING OGONEK}",
		'='  => '°',
		'>'  => 'Œ',
		'?'  => "\N{COMBINING SHORT STROKE OVERLAY}",
		'@'  => "\N{COMBINING DOUBLE ACUTE ACCENT}",
		'['  => '«',
		"\\" => 'ĳ',
		']'  => '»',
		'^'  => "\N{COMBINING CARON}",
		'_'  => '—',
		'`'  => "\N{COMBINING GRAVE ACCENT}",
		'a'  => 'ä',
		'A'  => 'Ä',
		'B'  => 'Õ',
		'b'  => 'õ',
		'C'  => 'Ç',
		'c'  => 'ç',
		'D'  => 'É',
		'd'  => 'é',
		'e'  => 'ë',
		'E'  => 'Ë',
		'F'  => 'Ê',
		'f'  => 'ê',
		'G'  => 'Î',
		'g'  => 'î',
		'h'  => 'û',
		'H'  => 'Û',
		'I'  => 'Ï',
		'i'  => 'ï',
		'j'  => 'ú',
		'J'  => 'Ú',
		'k'  => 'í',
		'K'  => 'Í',
		'L'  => 'Ó',
		'l'  => 'ó',
		'm'  => 'ì',
		'M'  => 'Ì',
		'n'  => 'ñ',
		'N'  => 'Ñ',
		'o'  => 'ö',
		'O'  => 'Ö',
		'P'  => 'Ò',
		'p'  => 'ò',
		'Q'  => 'Å',
		'q'  => 'å',
		'R'  => 'È',
		'r'  => 'è',
		'S'  => 'À',
		's'  => 'à',
		'T'  => 'Ø',
		't'  => 'ø',
		'u'  => 'ü',
		'U'  => 'Ü',
		'v'  => 'ã',
		'V'  => 'Ã',
		'W'  => 'Æ',
		'w'  => 'æ',
		'x'  => 'â',
		'X'  => 'Â',
		'Y'  => 'Ù',
		'y'  => 'ù',
		'z'  => 'á',
		'Z'  => 'Á',
		'{'  => '‹',
		'|'  => 'Ĳ',
		'}'  => '›',
		'~'  => "\N{COMBINING TILDE}",
	},
	'*' => {
		# dead_greek digraphs from data/xorg-compose
		'A' => 'Α',
		'a' => 'α',
		'B' => 'Β',
		'b' => 'β',
		'D' => 'Δ',
		'd' => 'δ',
		'E' => 'Ε',
		'e' => 'ε',
		'F' => 'Φ',
		'f' => 'φ',
		'G' => 'Γ',
		'g' => 'γ',
		'H' => 'Η',
		'h' => 'η',
		'I' => 'Ι',
		'i' => 'ι',
		'J' => 'Θ',
		'j' => 'θ',
		'K' => 'Κ',
		'k' => 'κ',
		'L' => 'Λ',
		'l' => 'λ',
		'M' => 'Μ',
		'm' => 'μ',
		'N' => 'Ν',
		'n' => 'ν',
		'O' => 'Ο',
		'o' => 'ο',
		'P' => 'Π',
		'p' => 'π',
		'Q' => 'Χ',
		'q' => 'χ',
		'R' => 'Ρ',
		'r' => 'ρ',
		'S' => 'Σ',
		's' => 'σ',
		'T' => 'Τ',
		't' => 'τ',
		'U' => 'Υ',
		'u' => 'υ',
		'W' => 'Ω',
		'w' => 'ω',
		'X' => 'Ξ',
		'x' => 'ξ',
		'Y' => 'Ψ',
		'y' => 'ψ',
		'Z' => 'Ζ',
		'z' => 'ζ',
		'*' => 'µ', # MICRO SIGN at space and double mode
	},
);

+{
	%{ kbmodes(\%rows) },
	mode => {
		''  => 'altgr-shifted ⌥',
		'*' => 'greek mode ⌥*',
	},
	version => '1.0', # upstream v2.0 2021/04/12
	title => 'Western European',
	category => 'latin/thirdparty/xorg',
	intro => join("\n",
		'Layout (<a href="https://altgr-weur.eu/" target=_blank>available</a> for major OSes)',
		'to provide all accented characters commonly used',
		'in 10 Western European languages available through one AltGr keystroke.',
	),
	description => [
		"QWERTY for Western European languages",
	],
}
