Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Abdallah-Abdelazim/96c5ce8a077cfa590ea6b60e63f68cea to your computer and use it in GitHub Desktop.
Save Abdallah-Abdelazim/96c5ce8a077cfa590ea6b60e63f68cea to your computer and use it in GitHub Desktop.
Fix: Alt+Shift layout switching not working in Arabic keyboard layout on KDE neon/Kubuntu
default partial alphanumeric_keys
xkb_symbols "basic" {
name[Group1]= "Arabic";
// NOTES:
//
// There is also a combined shadda diacritic in the AltGr position of the
// simple diacritics fatha, fathatan, damma, dammatan, kasra and kasratan. (??)
// Should a third state be added to Group2?
key <TLDE> { [ Arabic_thal, Arabic_shadda ] };
key <AE01> { [ 1, exclam ] };
key <AE02> { [ 2, at ] };
key <AE03> { [ 3, numbersign ] };
key <AE04> { [ 4, dollar ] };
key <AE05> { [ 5, percent ] };
key <AE06> { [ 6, asciicircum ] };
key <AE07> { [ 7, ampersand ] };
key <AE08> { [ 8, asterisk ] };
key <AE09> { [ 9, parenright ] };
key <AE10> { [ 0, parenleft ] };
key <AE11> { [ minus, underscore ] };
key <AE12> { [ equal, plus ] };
key <AD01> { [ Arabic_dad, Arabic_fatha ] };
key <AD02> { [ Arabic_sad, Arabic_fathatan ] };
key <AD03> { [ Arabic_theh, Arabic_damma ] };
key <AD04> { [ Arabic_qaf, Arabic_dammatan ] };
key <AD05> { [ Arabic_feh, 0x100fef9, 0x10006a4 ] };
key <AD06> { [ Arabic_ghain, Arabic_hamzaunderalef] };
key <AD07> { [ Arabic_ain, grave ] };
key <AD08> { [ Arabic_ha, division ] };
key <AD09> { [ Arabic_khah, multiply ] };
key <AD10> { [ Arabic_hah, Arabic_semicolon ] };
key <AD11> { [ Arabic_jeem, less, 0x1000686 ] };
key <AD12> { [ Arabic_dal, greater ] };
key <AC01> { [ Arabic_sheen, Arabic_kasra ] };
key <AC02> { [ Arabic_seen, Arabic_kasratan ] };
key <AC03> { [ Arabic_yeh, bracketright ] };
key <AC04> { [ Arabic_beh, bracketleft, 0x100067e ] };
key <AC05> { [ Arabic_lam, 0x100fef7 ] };
key <AC06> { [ Arabic_alef, Arabic_hamzaonalef ] };
key <AC07> { [ Arabic_teh, Arabic_tatweel ] };
key <AC08> { [ Arabic_noon, Arabic_comma ] };
key <AC09> { [ Arabic_meem, slash ] };
key <AC10> { [ Arabic_kaf, colon, 0x10006af ] };
key <AC11> { [ Arabic_tah, quotedbl ] };
key <LSGT> { [ bar, brokenbar ] };
key <AB01> { [Arabic_hamzaonyeh, asciitilde, guillemotright ]};
key <AB02> { [ Arabic_hamza, Arabic_sukun, guillemotleft ]};
key <AB03> { [Arabic_hamzaonwaw, braceright ] };
key <AB04> { [ Arabic_ra, braceleft ] };
key <AB05> { [ 0x100fefb, 0x100fef5 ] };
key <AB06> { [Arabic_alefmaksura, Arabic_maddaonalef ] };
key <AB07> { [Arabic_tehmarbuta, apostrophe ] };
key <AB08> { [ Arabic_waw, comma ] };
key <AB09> { [ Arabic_zain, period ] };
key <AB10> { [ Arabic_zah, Arabic_question_mark ] };
};
partial alphanumeric_keys
xkb_symbols "qwerty" {
include "ara(basic)"
name[Group1]= "Arabic (qwerty)";
};
partial alphanumeric_keys
xkb_symbols "azerty" {
include "ara(basic)"
name[Group1]= "Arabic (azerty)";
// The North African Arabic keyboard differs from the Middle East one
// by the numeric row; it follows French keyboard style.
//
// PROBLEM: some characters are inaccessible: ! @ # $ % ^ *
// Should they go elsewhere? Replacing " ' that are now doubled?
// Also, dead_circumflex and dead_diaeresis from French keyboard
// as well as ugrave are missing, which questions the utility of the
// other accentuated Latin letters. Maybe this is useful only with
// a French keyboard in Group1? Then, shouldn't Group1 be filled?
key <AE01> { [ ampersand, 1 ] };
key <AE02> { [ eacute, 2 ] };
key <AE03> { [ quotedbl, 3 ] };
key <AE04> { [ apostrophe, 4 ] };
key <AE05> { [ parenleft, 5 ] };
key <AE06> { [ minus, 6 ] };
key <AE07> { [ egrave, 7 ] };
key <AE08> { [ underscore, 8 ] };
key <AE09> { [ ccedilla, 9 ] };
key <AE10> { [ agrave, 0 ] };
key <AE11> { [ parenright, degree ] };
};
partial hidden alphanumeric_keys
xkb_symbols "digits_KP" {
// Use Arabic-script digits on the keypad.
key <KP7> { [ KP_Home, 0x1000667 ] };
key <KP8> { [ KP_Up, 0x1000668 ] };
key <KP9> { [ KP_Prior, 0x1000669 ] };
key <KP4> { [ KP_Left, 0x1000664 ] };
key <KP5> { [ KP_Begin, 0x1000665 ] };
key <KP6> { [ KP_Right, 0x1000666 ] };
key <KP1> { [ KP_End, 0x1000661 ] };
key <KP2> { [ KP_Down, 0x1000662 ] };
key <KP3> { [ KP_Next, 0x1000663 ] };
key <KP0> { [ KP_Insert, 0x1000660 ] };
};
partial alphanumeric_keys
xkb_symbols "digits" {
include "ara(basic)"
name[Group1]= "Arabic (digits)";
// Use Arabic-script digits on the numeric row.
key <AE01> { [ 0x1000661, exclam ] };
key <AE02> { [ 0x1000662, at ] };
key <AE03> { [ 0x1000663, numbersign ] };
key <AE04> { [ 0x1000664, dollar ] };
key <AE05> { [ 0x1000665, Arabic_percent ] };
key <AE06> { [ 0x1000666, asciicircum ] };
key <AE07> { [ 0x1000667, ampersand ] };
key <AE08> { [ 0x1000668, asterisk ] };
key <AE09> { [ 0x1000669, parenright ] };
key <AE10> { [ 0x1000660, parenleft ] };
include "ara(digits_KP)"
};
partial alphanumeric_keys
xkb_symbols "qwerty_digits" {
include "ara(digits)"
name[Group1]= "Arabic (qwerty/digits)";
};
partial alphanumeric_keys
xkb_symbols "azerty_digits" {
include "ara(azerty)"
name[Group1]= "Arabic (azerty/digits)";
key <AE01> { [ ampersand, 0x1000661 ] };
key <AE02> { [ eacute, 0x1000662 ] };
key <AE03> { [ quotedbl, 0x1000663 ] };
key <AE04> { [ apostrophe, 0x1000664 ] };
key <AE05> { [ parenleft, 0x1000665 ] };
key <AE06> { [ minus, 0x1000666 ] };
key <AE07> { [ egrave, 0x1000667 ] };
key <AE08> { [ underscore, 0x1000668 ] };
key <AE09> { [ ccedilla, 0x1000669 ] };
key <AE10> { [ agrave, 0x1000660 ] };
};
// Arabic keyboard using Buckwalter transliteration
// http://www.qamus.org/transliteration.htm
// Martin Vidner
partial alphanumeric_keys
xkb_symbols "buckwalter" {
name[Group1]= "Arabic (Buckwalter)";
// ARABIC LETTER SUPERSCRIPT ALEF
key <TLDE> { [ 0x1000670, Arabic_shadda ] };
// Arabic_0 .. Arabic_9 do not work in Kate,
// Unicode never seems to work worse.
key <AE01> { [ 0x1000661, VoidSymbol ] };
key <AE02> { [ 0x1000662, VoidSymbol ] };
key <AE03> { [ 0x1000663, VoidSymbol ] };
key <AE04> { [ 0x1000664, Arabic_sheen ] };
key <AE05> { [ 0x1000665, Arabic_percent ] };
key <AE06> { [ 0x1000666, VoidSymbol ] };
key <AE07> { [ 0x1000667, Arabic_hamzaonwaw ] };
key <AE08> { [ 0x1000668, Arabic_thal ] };
// ORNATE LEFT PARENTHESIS
key <AE09> { [ 0x1000669, 0x100fd3e ] };
// ORNATE RIGHT PARENTHESIS
key <AE10> { [ 0x1000660, 0x100fd3f ] };
key <AE11> { [ minus, Arabic_tatweel ] };
key <AE12> { [ equal, plus ] };
key <AD01> { [ Arabic_qaf, VoidSymbol ] };
key <AD02> { [ Arabic_waw, Arabic_hamzaonwaw ] };
key <AD03> { [ VoidSymbol, Arabic_ain ] };
key <AD04> { [ Arabic_ra, VoidSymbol ] };
key <AD05> { [ Arabic_teh, Arabic_tah ] };
key <AD06> { [ Arabic_yeh, Arabic_alefmaksura ] };
key <AD07> { [ Arabic_damma, VoidSymbol ] };
key <AD08> { [ Arabic_kasra, Arabic_hamzaunderalef ] };
key <AD09> { [ Arabic_sukun, Arabic_hamzaonalef ] };
key <AD10> { [ Arabic_tehmarbuta, VoidSymbol ] };
// ARABIC LETTER ALEF WASLA
key <AD11> { [ VoidSymbol, 0x1000671 ] };
key <AD12> { [ VoidSymbol, Arabic_hamzaonyeh ] };
key <AC01> { [ Arabic_fatha, Arabic_alef ] };
key <AC02> { [ Arabic_seen, Arabic_sad ] };
key <AC03> { [ Arabic_dal, Arabic_dad ] };
key <AC04> { [ Arabic_feh, Arabic_fathatan ] };
key <AC05> { [ Arabic_ghain, VoidSymbol ] };
key <AC06> { [ Arabic_ha, Arabic_hah ] };
key <AC07> { [ Arabic_jeem, VoidSymbol ] };
key <AC08> { [ Arabic_kaf, Arabic_kasratan ] };
key <AC09> { [ Arabic_lam, VoidSymbol ] };
key <AC10> { [ Arabic_semicolon, VoidSymbol ] };
key <AC11> { [ Arabic_hamza, VoidSymbol ] };
key <BKSL> { [ VoidSymbol, Arabic_maddaonalef ] };
key <AB01> { [ Arabic_zain, Arabic_zah ] };
key <AB02> { [ Arabic_khah, VoidSymbol ] };
key <AB03> { [ VoidSymbol, VoidSymbol ] };
key <AB04> { [ Arabic_theh, VoidSymbol ] };
key <AB05> { [ Arabic_beh, VoidSymbol ] };
key <AB06> { [ Arabic_noon, Arabic_dammatan ] };
key <AB07> { [ Arabic_meem, VoidSymbol ] };
key <AB08> { [ Arabic_comma, Arabic_hamzaunderalef ] };
// ARABIC FULL STOP (Urdu)
key <AB09> { [ 0x10006d4, Arabic_hamzaonalef ] };
key <AB10> { [ VoidSymbol, Arabic_question_mark ] };
};
partial alphanumeric_keys
xkb_symbols "olpc" {
include "ara(basic)"
// As part of the OLPC design, some changes were made to the Arabic
// keyboard design. Major changes are:
//
// * Removed the lam-alef single character. People type as they
// pronounce, and lam-alef is just a visual formatting of the
// sequence and is not often used on the keyboard. It is
// similar to the Allah single character, which is also not on
// the keyboard.
// * Moved the following keys:
// o Thal from TLDE to AB05: due to space limitation on the
// keyboard, but also accessibility.
// o Shadda from TLDE to AD05.
// * Placed currency letters on number keys and moved the ^ and &
// characters to lower keys. (This change is worth revisiting
// before end of test period).
key <TLDE> { [ grave, asciitilde ] };
key <AE01> { [ 0x1000661, exclam ] };
key <AE02> { [ 0x1000662, at ] };
key <AE03> { [ 0x1000663, numbersign ] };
key <AE04> { [ 0x1000664, dollar ] };
key <AE05> { [ 0x1000665, Arabic_percent ] };
key <AE06> { [ 0x1000666, sterling ] };
key <AE07> { [ 0x1000667, EuroSign ] };
key <AE08> { [ 0x1000668, asterisk ] };
key <AE09> { [ 0x1000669, parenright ] };
key <AE10> { [ 0x1000660, parenleft ] };
key <AD05> { [ Arabic_feh, Arabic_shadda ] };
key <AD08> { [ Arabic_heh, division ] };
key <AD11> { [ Arabic_jeem, braceright ] };
key <AD12> { [ Arabic_dal, braceleft ] };
key <AC01> { [ Arabic_sheen, greater ] };
key <AC02> { [ Arabic_seen, less ] };
key <AC05> { [ Arabic_lam, ampersand ] };
key <AC10> { [ Arabic_kaf ] };
key <AC11> { [ Arabic_tah ] };
key <BKSL> { [ backslash, bar ] };
// REH isolated form?
key <AB03> { [ Arabic_hamzaonwaw, Arabic_kasra ] };
key <AB04> { [ Arabic_ra, Arabic_kasratan ] };
key <AB05> { [ Arabic_thal, asciicircum ] };
include "group(olpc)"
};
partial alphanumeric_keys
xkb_symbols "mac" {
//This is a layout that is compatible with macbooks
include "ara(digits)"
name[Group1]= "Arabic (Macintosh)";
key <AE11> { [ minus, underscore ] };
key <AE12> { [ equal, plus ] };
key <TLDE> { [ VoidSymbol, VoidSymbol ] };
key <AD03> { [ Arabic_theh, Arabic_kasra ] };
key <AD04> { [ Arabic_qaf, Arabic_kasratan ] };
key <AD05> { [ Arabic_feh, Arabic_damma ] };
key <AD06> { [ Arabic_ghain, Arabic_dammatan ] };
key <AD07> { [ Arabic_ain, Arabic_sukun ] };
key <AD08> { [ Arabic_ha, Arabic_shadda ] };
key <AD09> { [ Arabic_khah, bracketright ] };
key <AD10> { [ Arabic_hah, bracketleft ] };
key <AD11> { [ Arabic_jeem, braceright ] };
key <AD12> { [Arabic_tehmarbuta, braceleft ] };
key <AC01> { [ Arabic_sheen, guillemotright ] };
key <AC02> { [ Arabic_seen, guillemotleft ] };
key <AC03> { [ Arabic_yeh, Arabic_alefmaksura] };
key <AC04> { [ Arabic_beh, VoidSymbol ] };
key <AC05> { [ Arabic_lam, VoidSymbol ] };
key <AC06> { [ Arabic_alef, Arabic_maddaonalef ] };
key <AC07> { [ Arabic_teh, VoidSymbol ] };
key <AC08> { [ Arabic_noon, VoidSymbol ] };
key <AC09> { [ Arabic_meem, VoidSymbol ] };
key <AC10> { [ Arabic_kaf, colon ] };
key <AC11> { [ Arabic_semicolon, quotedbl ] };
key <BKSL> { [ backslash, bar ] };
key <LSGT> { [ Arabic_tatweel, VoidSymbol ] };
key <AB01> { [ Arabic_zah, VoidSymbol ] };
key <AB02> { [ Arabic_tah, VoidSymbol ] };
key <AB03> { [ Arabic_thal, Arabic_hamzaonyeh ] };
key <AB04> { [ Arabic_dal, Arabic_hamza ] };
key <AB05> { [ Arabic_zain, Arabic_hamzaonalef ] };
key <AB06> { [ Arabic_ra, Arabic_hamzaunderalef ] };
key <AB07> { [ Arabic_waw, Arabic_hamzaonwaw ] };
key <AB08> { [ Arabic_comma, greater ] };
key <AB09> { [ period, less ] };
key <AB10> { [ slash, Arabic_question_mark ] };
};
// EXTRAS:
partial alphanumeric_keys
xkb_symbols "sun_type6" {
include "sun_vndr/ara(sun_type6)"
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment