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

my %rows = (
	'' => {
	'A' => "\N{MACRON}",
	'a' => "\N{COMBINING MACRON}",
	'B' => "\N{BREVE}",
	'b' => "\N{COMBINING BREVE}",
	'C' => "\N{CEDILLA}",
	'c' => "\N{COMBINING CEDILLA}",
	'D' => 'Ð',
	'd' => 'ð',
	'E' => "\N{ACUTE ACCENT}",
	'e' => "\N{COMBINING ACUTE ACCENT}",
	'f' => 'ƒ',
	'F' => "\N{COMBINING TILDE BELOW}",
	'G' => "\N{COMBINING CIRCUMFLEX ACCENT BELOW}",
	'g' => '©',
	'H' => "\N{MODIFIER LETTER LOW MACRON}",
	'h' => "\N{COMBINING MACRON BELOW}",
	'I' => "\N{MODIFIER LETTER APOSTROPHE}",
	'i' => "\N{COMBINING COMMA ABOVE}",
	'J' => "\N{DOUBLE ACUTE ACCENT}",
	'j' => "\N{COMBINING DOUBLE ACUTE ACCENT}",
	'K' => "\N{RING ABOVE}",
	'k' => "\N{COMBINING RING ABOVE}",
	'L' => '-',
	'l' => "\N{COMBINING SHORT STROKE OVERLAY}", # precomposed ŧʉɨɵđǥħłƶƀ
	'M' => "\N{OGONEK}",
	'm' => "\N{COMBINING OGONEK}",
	'N' => "\N{SMALL TILDE}",
	'n' => "\N{COMBINING TILDE}",
	'O' => 'Ø',
	'o' => 'ø',
	'P' => ',',
	'p' => "\N{COMBINING COMMA BELOW}",
	'Q' => 'Œ',
	'q' => 'œ',
	'R' => '‰',
	'r' => '®',
	'S' => "\N{COMBINING INVERTED BREVE}",
	's' => 'ß',
	'T' => 'Þ',
	't' => 'þ',
	'U' => "\N{DIAERESIS}",
	'u' => "\N{COMBINING DIAERESIS}",
	'V' => "\N{CARON}",
	'v' => "\N{COMBINING CARON}",
	'W' => "\N{DOT ABOVE}",
	'w' => "\N{COMBINING DOT ABOVE}",
	'X' => '.',
	'x' => "\N{COMBINING DOT BELOW}",
	'Y' => "\N{COMBINING DOUBLE GRAVE ACCENT}",
	'y' => '¥',
	'Z' => "\N{MODIFIER LETTER GLOTTAL STOP}",
	'z' => "\N{COMBINING HOOK ABOVE}",
	'[' => "\N{LEFT DOUBLE QUOTATION MARK}",
	'{' => "\N{RIGHT DOUBLE QUOTATION MARK}",
	']' => "\N{LEFT SINGLE QUOTATION MARK}",
	'}' => "\N{RIGHT SINGLE QUOTATION MARK}",
	';' => '…',
	':' => '№',
	'"' => 'Æ',
	"'" => 'æ',
	'|' => '»',
	'\\'=> '«',
	'<' => "\N{DOUBLE LOW-9 QUOTATION MARK}",
	',' => '≤',
	'>' => 'ʔ',
	'.' => '≥',
	'/' => '÷',
	'?' => '¿',
	'~' => "\N{GRAVE ACCENT}",
	'`' => "\N{COMBINING GRAVE ACCENT}",
	'1' => '¡',
	'!' => '⁄',
	'2' => '™',
	'@' => '€',
	'3' => '£',
	'#' => '‹',
	'4' => '¢',
	'$' => '›',
	'5' => '§',
	'%' => '†',
	'6' => "\N{COMBINING CIRCUMFLEX ACCENT}",
	'^' => "\N{MODIFIER LETTER CIRCUMFLEX ACCENT}",
	'7' => '¶',
	'&' => '‡',
	'8' => '•',
	'*' => '°',
	'9' => 'ª',
	'(' => '·',
	'0' => 'º',
	')' => '‚',
	'-' => '–',
	'_' => '—',
	'+' => '±',
	'=' => '≠',
	},

	':' => {
		'@' => 'Ƨ',
		'2' => 'ƨ',
		'#' => 'Ɛ',
		'3' => 'ɛ',
		'%' => 'Ƽ',
		'5' => 'ƽ',
		'^' => 'Ƅ',
		'6' => 'ƅ',
		'7' => '⁊',
		'*' => 'Ȣ',
		'8' => 'ȣ',
		'Q' => 'Ƣ',
		'q' => 'ƣ',
		'W' => 'Ƿ',
		'w' => 'ƿ',
		'E' => 'Ǝ',
		'e' => 'ǝ',
		'R' => 'Ʀ',
		'r' => 'ʀ',
		'k' => 'ĸ',
		'Y' => 'Ȝ',
		'y' => 'ȝ',
		'U' => 'Ʊ',
		'u' => 'ʊ',
		'A' => 'Ə',
		'a' => 'ə',
		's' => 'ſ',
		'G' => 'Ɣ',
		'g' => 'ɣ',
		'H' => 'Ƕ',
		'h' => 'ƕ',
		'J' => 'Ƞ',
		'j' => 'ƞ',
		'K' => 'Ǩ',
		'Z' => 'Ʒ',
		'z' => 'ʒ',
		'C' => 'Ɔ',
		'c' => 'ɔ',
		'v' => 'ʌ',
		'N' => 'Ŋ',
		'n' => 'ŋ',
		'M' => 'Ɯ',
		'm' => 'ɯ',
		'"' => 'ʺ',
		"'" => 'ʹ',
	},

	'>' => {
		'q' => 'ʠ',
		'R' => 'Ʈ', # mirrored preview
		'r' => 'ʈ',
		'T' => 'Ƭ',
		't' => 'ƭ',
		'Y' => 'Ƴ',
		'y' => 'ƴ',
		'U' => 'Ʋ',
		'u' => 'ʋ',
		'I' => 'Ɩ',
		'i' => 'ɩ',
		'P' => 'Ƥ',
		'p' => 'ƥ',
		'S' => 'Ʃ',
		's' => 'ʃ',
		'D' => 'Ɗ',
		'd' => 'ɗ',
		'F' => 'Ƒ',
		'f' => 'ƒ',
		'G' => 'Ɠ',
		'g' => 'ɠ',
		'h' => 'ɦ',
		'K' => 'Ƙ',
		'k' => 'ƙ',
		'Z' => 'Ȥ',
		'z' => 'ȥ',
		'X' => 'Ɖ',
		'x' => 'ɖ',
		'C' => 'Ƈ',
		'c' => 'ƈ',
		'N' => 'Ɲ',
		'n' => 'ɲ',
		'B' => 'Ɓ',
		'b' => 'ɓ',
	},
);

+{
	%{ kbmodes(\%rows) },
	mode => {
		''  => 'option-shifted ⌥',
		':' => '№ number prefix ⌥:',
		'>' => 'ʔ hook prefix ⌥>',
	},
	version => '1.1',
	title => 'ABC option',
	category => '2/latin/macos',
	intro => join("\n",
		'Resulting <a href="/unicode">selection</a> of <a href="/charset">Unicode</a> characters',
		"while pressing ⌥ Option (Alt) with Apple's",
		'ABC <em title="distinct from just ABC">Extended</a>',
		"(formerly US Extended and Extended Roman) layout",
		'on <abbr title="at least in Ventura 13.2">macOS</abbr>.',
		'Significant changes from standard',
		'<a href="/keyboard/altgr/macos">US</a> or local options.',
	),
	description => [
		"Apple ABC Extended keyboard layout table",
		"with the Option modifier key.",
	],
	image => 'data/keyboard/thumb/macbook-gray.jpg',
	imagealt => 'Option key on a black MacBook',
}
