//
// Default layout, additional characters must be in "phoneticx" (with "x") or other extended layout variants below
//
default partial alphanumeric_keys
xkb_symbols "phonetic" {

    name[Group1]= "Indonesian (Arab Melayu, phonetic)";

    // `
    key <TLDE> { [ grave,        asciitilde,        VoidSymbol, VoidSymbol                ] };

    // 1..=
    key <AE01> { [ Arabic_1,     exclam,            1,          VoidSymbol                ] };
    key <AE02> { [ Arabic_2,     at,                2,          VoidSymbol                ] };
    key <AE03> { [ Arabic_3,     numbersign,        3,          VoidSymbol                ] };
    key <AE04> { [ Arabic_4,     VoidSymbol,        4,          dollar                    ] };
    key <AE05> { [ Arabic_5,     Arabic_percent,    5,          percent                   ] };
    key <AE06> { [ Arabic_6,     asciicircum,       6,          VoidSymbol                ] };
    key <AE07> { [ Arabic_7,     ampersand,         7,          VoidSymbol                ] };
    key <AE08> { [ Arabic_8,     asterisk,          8,          VoidSymbol                ] };
    key <AE09> { [ Arabic_9,     parenright,        9,          VoidSymbol                ] };
    key <AE10> { [ Arabic_0,     parenleft,         0,          VoidSymbol                ] };
    key <AE11> { [ minus,        Arabic_tatweel,    VoidSymbol, underscore                ] };
    key <AE12> { [ equal,        plus,              VoidSymbol, VoidSymbol                ] };

    // Q..]
    key <AD01> { [ Arabic_qaf,          Arabic_maddaonalef,     VoidSymbol,    VoidSymbol      ] };
    key <AD02> { [ Arabic_waw,          VoidSymbol,             VoidSymbol,    VoidSymbol      ] };
    key <AD03> { [ Arabic_alefmaksura,  Arabic_ain,             VoidSymbol,    VoidSymbol      ] };
    key <AD04> { [ Arabic_ra,           VoidSymbol,             VoidSymbol,    VoidSymbol      ] };
    key <AD05> { [ Arabic_teh,          Arabic_tehmarbuta,      Arabic_tah,    VoidSymbol      ] };
    key <AD06> { [ Arabic_yeh,          VoidSymbol,             VoidSymbol,    VoidSymbol      ] };
    key <AD07> { [ Arabic_hamzaonwaw,   VoidSymbol,             VoidSymbol,    VoidSymbol      ] };
    key <AD08> { [ Arabic_hamzaonyeh,   Arabic_hamzaunderalef,  VoidSymbol,    VoidSymbol      ] };
    key <AD09> { [ Arabic_hamza,        U0674,                  VoidSymbol,    VoidSymbol      ] }; // high_hamza
    key <AD10> { [ Arabic_veh,          VoidSymbol,             VoidSymbol,    VoidSymbol      ] }; // p
    key <AD11> { [ bracketright,        braceright,             VoidSymbol,    VoidSymbol      ] };
    key <AD12> { [ bracketleft,         braceleft,              VoidSymbol,    VoidSymbol      ] };

    // \ 
    key <BKSL> { [ backslash,           bar,                    VoidSymbol,    VoidSymbol      ] };

    // A..'
    key <AC01> { [ Arabic_alef,       Arabic_hamzaonalef,  VoidSymbol,      VoidSymbol       ] };
    key <AC02> { [ Arabic_seen,       Arabic_sheen,        Arabic_sad,      VoidSymbol       ] };
    key <AC03> { [ Arabic_dal,        VoidSymbol,          Arabic_dad,      VoidSymbol       ] };
    key <AC04> { [ Arabic_feh,        VoidSymbol,          VoidSymbol,      VoidSymbol       ] };
    key <AC05> { [ U0762,             U06a0,               Arabic_ghain,    U06af            ] }; // g, ng, gaf (tausug)
    key <AC06> { [ Arabic_ha,         Arabic_hah,          VoidSymbol,      VoidSymbol       ] };
    key <AC07> { [ Arabic_jeem,       VoidSymbol,          VoidSymbol,      VoidSymbol       ] };
    key <AC08> { [ Arabic_keheh,      Arabic_kaf,          VoidSymbol,      VoidSymbol       ] }; // k
    key <AC09> { [ Arabic_lam,        VoidSymbol,          VoidSymbol,      VoidSymbol       ] };
    key <AC10> { [ Arabic_semicolon,  colon,               semicolon,       VoidSymbol       ] };
    key <AC11> { [ 0x10000ab,         0x10000bb,           apostrophe,      quotedbl         ] }; // «, »

    // not exist in US keyboard
    key <LSGT> { [ bar,               brokenbar,           VoidSymbol,      VoidSymbol       ] };

    // Z../
    key <AB01> { [ Arabic_zain,    Arabic_thal,           Arabic_zah,       VoidSymbol       ] };
    key <AB02> { [ Arabic_khah,    VoidSymbol,            VoidSymbol,       VoidSymbol       ] };
    key <AB03> { [ Arabic_tcheh,   VoidSymbol,            VoidSymbol,       VoidSymbol       ] }; // c
    key <AB04> { [ Arabic_theh,    VoidSymbol,            VoidSymbol,       U06cf            ] }; // waw_with_dot_above (malay)
    key <AB05> { [ Arabic_beh,     VoidSymbol,            VoidSymbol,       VoidSymbol       ] };
    key <AB06> { [ Arabic_noon,    U06bd,                 VoidSymbol,       VoidSymbol       ] }; // ny
    key <AB07> { [ Arabic_meem,    VoidSymbol,            VoidSymbol,       VoidSymbol       ] };
    key <AB08> { [ Arabic_comma,   greater,               comma,            0x100066b        ] }; // decimal_separator
    key <AB09> { [ period,         less,                  Arabic_fullstop,  0x100066c        ] }; // thousands_separator
    key <AB10> { [ slash,          Arabic_question_mark,  0x100060d,        question         ] }; // date_separator
    
    
    include "level3(ralt_switch)"
};


//
// Extended layout, non-standard characters
//
partial alphanumeric_keys
xkb_symbols "phoneticx" {

    include "id(phonetic)"
    name[Group1]= "Indonesian (Arab Melayu, ext. phonetic)";

    // 1..=
    key <AE01> { [ NoSymbol,  NoSymbol,  NoSymbol,      Arabic_superscript_alef   ] };
    key <AE09> { [ NoSymbol,  NoSymbol,  NoSymbol,      0x100fd3e                 ] }; // ornate_left
    key <AE10> { [ NoSymbol,  NoSymbol,  NoSymbol,      0x100fd3f                 ] }; // ornate_right

    // Q..]
    key <AD02> { [ NoSymbol,  NoSymbol,  Arabic_shadda, NoSymbol                  ] };
    key <AD03> { [ NoSymbol,  NoSymbol,  0x10008e6,     0x10008e4                 ] }; // curly_kasra, curly_fatha
    key <AD07> { [ NoSymbol,  NoSymbol,  Arabic_damma,  Arabic_dammatan           ] };
    key <AD08> { [ NoSymbol,  NoSymbol,  Arabic_kasra,  Arabic_kasratan           ] };
    key <AD09> { [ NoSymbol,  NoSymbol,  0x100065d,     NoSymbol                  ] }; // reversed_damma

    // A..'
    key <AC01> { [ NoSymbol,  NoSymbol,  Arabic_fatha,  Arabic_fathatan           ] };
    key <AC07> { [ NoSymbol,  NoSymbol,  0x10008f8,     NoSymbol                  ] }; // right_arrowhead_above

    // Z../
    key <AB02> { [ NoSymbol,  NoSymbol,  0x100065b,     0x100065C                 ] }; // inverted_small_v_above, dot_below
    key <AB03> { [ NoSymbol,  NoSymbol,  Arabic_sukun,  0x10006E1                 ] }; // small_high_dotless_head_of_khah
};

