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

my %rows = (
'' => {
	'~' => "\N{COMBINING TILDE}",
	'`' => '˞',
	'!' => 'ꜜ',
	'1' => 'ɨ',
	'@' => 'ə',
	'2' => 'ø',
	'#' => "\N{COMBINING ACUTE ACCENT}",
	'3' => 'ɜ',
	'$' => "\N{COMBINING MACRON}",
	'4' => 'ɾ',
	'%' => "\N{COMBINING GRAVE ACCENT}",
	'5' => 'ɫ',
	'^' => 'ꜛ',
	'6' => 'ɐ',
	'&' => 'æ',
	'7' => 'ɤ',
	'8' => 'ɵ',
	'9' => 'œ',
	'0' => "\N{COMBINING RING BELOW}",
	'+' => "\N{COMBINING INVERTED BREVE BELOW}",
	'=' => "\N{COMBINING VERTICAL LINE BELOW}",

	'Q' => 'ɒ',
	'W' => 'ʍ',
	'E' => 'ɛ',
	'R' => 'ʁ',
	'T' => 'θ',
	'Y' => 'ʏ',
	'U' => 'ʊ',
	'I' => 'ɪ',
	'O' => 'ɔ',
	'P' => 'ʋ',

	'A' => 'ɑ',
	'S' => 'ʃ',
	'D' => 'ð',
	'F' => 'ɱ',
	'G' => 'ɣ',
	'H' => 'ɥ',
	'J' => 'ɲ',
	'K' => 'ɬ',
	'L' => 'ʎ',
	':' => 'ː',
	';' => 'ʲ',
	'"' => 'ˌ',
	"'" => 'ˈ',
	'|' => '‖',

	'Z' => 'ʒ',
	'X' => 'χ',
	'C' => 'ç',
	'V' => 'ʌ',
	'B' => 'β',
	'N' => 'ŋ',
	'M' => 'ɯ',
	'?' => 'ʔ',
},
"\e" => {
	'~' => "\N{COMBINING TILDE BELOW}",
	'`' => "\N{COMBINING DIAERESIS BELOW}",
	'!' => '‼',
	'1' => 'ǃ',
	'@' => 'ɘ',
	'2' => "\N{COMBINING X ABOVE}",
	'#' => "\N{COMBINING DOUBLE ACUTE ACCENT}",
	'3' => 'ɞ',
	'$' => 'ɻ',
	'4' => 'ɽ',
	'%' => "\N{COMBINING DOUBLE GRAVE ACCENT}",
	'5' => "\N{COMBINING TILDE OVERLAY}",
	'^' => "\N{COMBINING CARON}",
	'6' => "\N{COMBINING CIRCUMFLEX ACCENT}",
	'&' => 'ɶ',
	'7' => "\N{COMBINING GRAVE-ACUTE-GRAVE}",
	'*' => "\N{COMBINING MACRON-ACUTE}",
	'8' => "\N{COMBINING GRAVE-MACRON}",
	'(' => "\N{COMBINING DOUBLE INVERTED BREVE}",
	'9' => "\N{COMBINING LEFT ANGLE ABOVE}",
	')' => "\N{COMBINING DOUBLE BREVE BELOW}",
	'0' => "\N{COMBINING CARON BELOW}",
	'_' => "\N{COMBINING MINUS SIGN BELOW}",
	'-' => '‿',
	'+' => "\N{COMBINING PLUS SIGN BELOW}",
	'=' => 'ǂ',

	'Q' => "\N{COMBINING SQUARE BELOW}",
	'q' => 'ˠ',
	'W' => "\N{COMBINING SEAGULL BELOW}",
	'w' => 'ʷ',
	'E' => 'ɝ',
	'e' => 'ɚ',
	'R' => 'ʀ',
	'r' => 'ɹ',
	'T' => '↗',
	't' => 'ʈ',
	'Y' => 'ʛ',
	'y' => 'ɠ',
	'U' => 'ᵿ',
	'u' => 'ʉ',
	'I' => 'ᵻ',
	'i' => 'ɨ',
	'O' => 'ʘ',
	'o' => 'ˡ',
	'P' => '↘',
	'p' => 'ɸ',
	'{' => "\N{COMBINING LEFT TACK BELOW}",
	'[' => "\N{COMBINING UP TACK BELOW}",
	'}' => "\N{COMBINING RIGHT TACK BELOW}",
	']' => "\N{COMBINING DOWN TACK BELOW}",

	'A' => "\N{COMBINING INVERTED BRIDGE BELOW}",
	'a' => 'ʰ',
	'S' => 'ʂ',
	's' => 'ɕ',
	'D' => "\N{COMBINING BRIDGE BELOW}",
	'd' => 'ɖ',
	'F' => 'ʄ',
	'f' => 'ɗ',
	'G' => 'ɢ',
	'g' => 'ɡ',
	'H' => 'ʜ',
	'h' => 'ɦ',
	'J' => 'ɟ',
	'j' => 'ʝ',
	'K' => 'ɮ',
	'k' => 'ɭ',
	'L' => 'ʟ',
	'l' => 'ɺ',
	':' => 'ˑ',
	';' => "\N{COMBINING BREVE}",
	'"' => "\N{COMBINING DIAERESIS}",
	"'" => 'ʼ',
	'|' => 'ǁ',
	'|' => 'ǀ',

	'Z' => 'ʐ',
	'z' => 'ʑ',
	'X' => 'ħ',
	'x' => 'ɧ',
	'C' => "\N{COMBINING RIGHT HALF RING BELOW}",
	'c' => "\N{COMBINING LEFT HALF RING BELOW}",
	'V' => 'ⱱ',
	'v' => 'ʋ',
	'B' => 'ʙ',
	'b' => 'ɓ',
	'N' => 'ɴ',
	'n' => 'ɳ',
	'M' => 'ɰ',
	'm' => 'ⁿ',
	'<' => 'ʢ',
	',' => '⟨',
	'>' => 'ʡ',
	'.' => '⟩',
	'?' => 'ʕ',
	'/' => 'ˤ',
},
);

while (my ($k, $c) = each $rows{"\e"}->%*) {
	$rows{''}{"+$k"} = $c;
}

+{
	%{ kbmodes(\%rows) },
	version => '1.0', # v1.0.3.40
	title => 'SuperIPA',
	# http://kbdlayout.info/SupIPA/
	intro => 'Custom map by Rebecca G. Bettencourt', # ©2018 Kreative Software
	category => 'specialized/ipa',
	moderows => '542-5421', # ;'
}
