// XKB symbols for the Chakma script (ISO 639-3: ccp), Unicode block U+11100-U+1114F.
// Every code point's official Unicode Character Database name was verified
// individually (compart.com / unicode.org) - an earlier draft trusted an
// AI-summarized character list that had consonants shifted by one position
// in the U+11120-U+11125 range (e.g. claimed a nonexistent SHA/SSA pair
// where the block actually has one SA, and put YA's codepoint on the RA
// key). Do not reintroduce sound/codepoint pairings without checking the
// codepoint's name directly.
//
// English-phonetic QWERTY mapping: each Latin letter's own sound maps to the
// Chakma consonant/vowel with that sound, e.g. k -> KA, a -> A. Characters
// type directly on level1/2 (no modifier, or Shift only) for ordinary text;
// AltGr (level3/4) reaches the less common marks (extra punctuation,
// explicit vowel-sign A, invisible stacker for conjuncts, etc).
//
// This mapping was assembled from Unicode reference data, not reviewed by a
// native Chakma speaker/typist - treat as a first cut and adjust key
// placement based on community feedback before wide distribution.

default partial alphanumeric_keys
xkb_symbols "basic" {
    name[Group1] = "Chakma";

    // Digits: own script by default, ASCII symbols on Shift, plain ASCII digit on AltGr.
    key <AE01> { [ U11137, exclam,       1, none ] };
    key <AE02> { [ U11138, at,           2, none ] };
    key <AE03> { [ U11139, numbersign,   3, none ] };
    key <AE04> { [ U1113A, dollar,       4, none ] };
    key <AE05> { [ U1113B, percent,      5, none ] };
    key <AE06> { [ U1113C, asciicircum,  6, none ] };
    key <AE07> { [ U1113D, ampersand,    7, none ] };
    key <AE08> { [ U1113E, asterisk,     8, none ] };
    key <AE09> { [ U1113F, parenleft,    9, none ] };
    key <AE10> { [ U11136, parenright,   0, none ] };

    key <AD01> { [ U1110B, none,    none,   none   ] }; // q: nga
    key <AD02> { [ U11124, U11130,  none,   none   ] }; // w: wa / OI matra
    key <AD03> { [ U11106, U1112C,  U11146, U1112D ] }; // e: independent E / E matra   AltGr: EI matra / AI matra
    key <AD04> { [ U11122, U11133,  none,   none   ] }; // r: ra / invisible stacker
    key <AD05> { [ U11116, U11117,  none,   none   ] }; // t: ta / tha (dental)
    key <AD06> { [ U11121, U11120,  none,   none   ] }; // y: ya / yya
    key <AD07> { [ U11105, U1112A,  U1112B, none   ] }; // u: independent U / U matra   AltGr: UU matra
    key <AD08> { [ U11104, U11128,  U11129, none   ] }; // i: independent I / I matra   AltGr: II matra
    key <AD09> { [ U1112E, U1112F,  none,   none   ] }; // o: O matra / AU matra
    key <AD10> { [ U1111B, U1111C,  none,   none   ] }; // p: pa / pha

    key <AC01> { [ U11103, U11145,  U11127, none   ] }; // a: independent A / AA matra   AltGr: explicit vowel sign A
    key <AC02> { [ U11125, none,    none,   none   ] }; // s: sa
    key <AC03> { [ U11118, U11119,  none,   none   ] }; // d: da / dha (dental)
    key <AC04> { [ none,   none,    none,   none   ] }; // f: (unassigned)
    key <AC05> { [ U11109, U1110A,  none,   none   ] }; // g: ga / gha
    key <AC06> { [ U11126, U11102,  none,   none   ] }; // h: ha / visarga
    key <AC07> { [ U1110E, U1110F,  none,   none   ] }; // j: ja / jha
    key <AC08> { [ U11107, U11108,  none,   none   ] }; // k: ka / kha
    key <AC09> { [ U11123, U11144,  none,   none   ] }; // l: la / lha

    key <AB01> { [ U11113, U11114,  none,   none   ] }; // z: dda / ddha (retroflex)
    key <AB02> { [ U11111, U11112,  none,   none   ] }; // x: tta / ttha (retroflex)
    key <AB03> { [ U1110C, U1110D,  none,   none   ] }; // c: cha / chha
    key <AB04> { [ U11147, none,    none,   none   ] }; // v: va (Pali)
    key <AB05> { [ U1111D, U1111E,  none,   none   ] }; // b: ba / bha
    key <AB06> { [ U1111A, U11115,  none,   none   ] }; // n: na / nna (retroflex)
    key <AB07> { [ U1111F, U11110,  U11100, none   ] }; // m: ma / nya            AltGr: candrabindu

    key <AC10> { [ U11134, U11101,  U11140, U11141 ] }; // ; : virama (maayyaa) / anusvara   AltGr: punctuation
    key <AC11> { [ U11142, U11143,  none,   none   ] }; // ' ": punctuation marks
    key <SPCE> { [ space,  space,   space,  space  ] };
};
