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

my %rows = (
	'' => {
		'`' => 'ǀ',
		'+`' => "\N{MODIFIER LETTER RHOTIC HOOK}",
		'~' => "\N{COMBINING LEFT ANGLE ABOVE}",
		'+1' => 'ɨ',
		'1' => 'ɴ',
		'!' => 'ǃ',
		'+2' => 'ø',
		'2' => 'ǁ',
		'@' => 'ˈ',
		'#' => 'ɹ',
		'3' => 'ɻ',
		'+3'=> 'ɜ',
		'4' => 'ɽ',
		'+4' => 'ɾ',
		'$' => '$',
		'+5' => 'ɫ',
		'5' => 'ʟ',
		'%' => 'ˌ',
		'+6' => 'ɐ',
		'6' => 'ɓ',
		'^' => "\N{COMBINING INVERTED BREVE BELOW}",
		'+7' => 'ɤ',
		'7' => 'ˠ',
		'&' => 'ɶ',
		'+8' => 'ɵ',
		'8' => 'ɞ',
		'*' => '*',
		'9' => 'ɠ',
		'+9' => 'œ',
		'(' => '(',
		'0' => "\N{COMBINING RING ABOVE}",
		'+0' => "\N{COMBINING RING BELOW}",
		')' => ')',
		'-' => "\N{COMBINING DOUBLE INVERTED BREVE}",
		'_' => '‿',
		'+-'=> '-',
		'+' => '+',
		'+=' => "\N{COMBINING VERTICAL LINE BELOW}",
		'=' => 'ǂ',

		'Q' => 'ɒ',
		'q' => "\N{COMBINING UP TACK BELOW}",
		'W' => 'ʍ',
		'w' => 'ʷ',
		'E' => 'ɛ',
		'e' => 'ɘ',
		'r' => 'ʀ',
		'R' => 'ʁ',
		'T' => 'θ',
		't' => 'ʈ',
		'Y' => 'ʏ',
		'y' => "\N{COMBINING DOWN TACK BELOW}",
		'u' => 'ɦ',
		'U' => 'ʊ',
		'I' => 'ɪ',
		'i' => "\N{COMBINING PLUS SIGN BELOW}",
		'O' => 'ɔ',
		'o' => 'ʘ',
		'P' => 'ʋ',
		'p' => 'ɸ',
		'{' => 'æ',
		'[' => 'ɗ',
		'}' => 'ʉ',
		']' => "\N{COMBINING BRIDGE BELOW}",

		'A' => 'ɑ',
		'a' => "\N{COMBINING MINUS SIGN BELOW}",
		'S' => 'ʃ',
		's' => 'ʂ',
		'D' => 'ð',
		'd' => 'ɖ',
		'F' => 'ɱ',
		'f' => 'ɟ',
		'g' => 'ɢ',
		'G' => 'ɣ',
		'H' => 'ɥ',
		'h' => 'ʰ',
		'J' => 'ɲ',
		'j' => 'ʝ',
		'K' => 'ɬ',
		'k' => 'ɮ',
		'L' => 'ʎ',
		'l' => 'ɭ',
		"'" => 'ɚ',
		"+'" => 'ʲ',
		'"' => 'ə',
		';' => "\N{COMBINING DIAERESIS}",
		':' => 'ː',
		'|' => "\N{COMBINING TILDE}",
		'\\'=> "\N{COMBINING TILDE BELOW}",

		'z' => 'ʐ',
		'Z' => 'ʒ',
		'X' => 'χ',
		'x' => 'ħ',
		'C' => 'ç',
		'c' => 'ɕ',
		'v' => 'ʑ',
		'V' => 'ʌ',
		'b' => 'ʙ',
		'B' => 'β',
		'N' => 'ŋ',
		'n' => 'ɳ',
		'M' => 'ɯ',
		'm' => 'ɰ',
		'<' => "\N{COMBINING BREVE}",
		',' => 'ʼ',
		'.' => "\N{COMBINING DIAERESIS BELOW}",
		'>' => '→',
		'?' => 'ʔ',
		'/' => 'ʕ',
	},
);

# missing: ʤ ɜ ɝ ʄ ɡ ʛ ɧ ʜ ɺ ʧ ⱱ ʡ ʢ

+{
	%{ kbmodes(\%rows) },
	version => '1.0',
	title => 'UCL phonetic',
	category => 'specialised/ipa',
	intro => join("\n",
		'Unicode Phonetic Keyboard',
		'<abbr title="dated 2009-06-28">v1.10</abbr> by Mark Huckvale',
		'from UCL, available for',
		'<a href="https://www.phon.ucl.ac.uk/resource/phonetics/">Windows</a>,',
		'providing <a href="/unicode">Unicode symbols</a>',
		'with Shift (top row) and Altgr',
		'to transcribe (at least English) sounds',
		'in <abbr title="International Phonetic Alphabet">IPA</abbr>.',
	),
	description => [
		"UCL Unicode Phonetic Keyboard layout table",
		"with the AltGr modifier key.",
	],
	image => 'data/keyboard/thumb/uclphonetics.jpg',
	imagealt => 'Mechanical typewriter somehow wrote ˈɪŋglɪʃ fəˈnɛtɪks',
	rows => [3,1,0],
	moderows => '21-241',
}
