// Belarusian standard keyboard, by Alexander Mikhailian <mikhailian@altern.org>.
// Reworked to use winkeys by default and russian keymap as base by Paul Lubetsky <vegeek@gmail.com>
// Added Belarusian-Russian and Russian-Belarusian variants, by Pavel Senchanka <pavel.senchanka@gmail.com>
// See freedesktop.org bug #23604

default partial alphanumeric_keys
xkb_symbols "basic" {
	include "ru(winkeys)"
	name[Group1]= "Belarusian";

	key	<AD09> {	[	Byelorussian_shortu,	Byelorussian_SHORTU	]	};
	key	<AD12> {	[	apostrophe,	apostrophe	]	};
	key	<AB05> {	[	Ukrainian_i,	Ukrainian_I	]	};
};

partial alphanumeric_keys
xkb_symbols "legacy" {
	include "by(basic)"
	name[Group1]= "Belarusian (legacy)";

	key <AE03> {        [               3,      numbersign      ]       };
	key <AE04> {        [               4,        asterisk      ]       };
	key <AE05> {        [               5,           colon      ]       };
	key <AE06> {        [               6,           comma      ]       };
	key <AE07> {        [               7,          period      ]       };
	key <AE08> {        [               8,       semicolon      ]       };
	key <AB10> {        [           slash,        question      ]       };
	key <BKSL> {        [       backslash,             bar      ]       };
};

partial alphanumeric_keys
xkb_symbols "latin" {
	include "latin"
	name[Group1]= "Belarusian (Latin)";

	key <AD02> {        [    w,    W,    scaron,    Scaron    ]       };
	key <AD07> {        [    u,    U,    ubreve,    Ubreve    ]       };
	key <AC02> {        [    s,    S,    sacute,    Sacute    ]       };
	key <AC09> {        [    l,    L,    lstroke,   Lstroke   ]       };
	key <AB01> {        [    z,    Z,    zacute,    Zacute    ]       };
	key <AB02> {        [    x,    X,    zcaron,    Zcaron    ]       };
	key <AB03> {        [    c,    C,    cacute,    Cacute    ]       };
	key <AB04> {        [    v,    V,    ccaron,    Ccaron    ]       };
	key <AB06> {        [    n,    N,    nacute,    Nacute    ]       };

	include "level3(ralt_switch)"
};

// Russian layout with Belarusian symbols on third level.
partial alphanumeric_keys
xkb_symbols "ru" {
	include "ru(winkeys)"
	name[Group1]= "Russian (Belarus)";

	key	<AB05> { [	Cyrillic_i,		Cyrillic_I,		Ukrainian_i,			Ukrainian_I			] };
	key	<AD09> { [	Cyrillic_shcha,		Cyrillic_SHCHA, 	Byelorussian_shortu,		Byelorussian_SHORTU		] };
	key	<AD12> { [	Cyrillic_hardsign,	Cyrillic_HARDSIGN, 	U2019,				apostrophe			] };

	include "level3(ralt_switch)"
};

// Belarusian layout extended with other East Slavic language symbols
// (Russian, Ukrainian).
partial alphanumeric_keys
xkb_symbols "intl" {
	include "by(basic)"
	name[Group1]= "Belarusian (intl.)";

	// Russian
	key	<AB05> { [	Ukrainian_i,		Ukrainian_I,		Cyrillic_i,			Cyrillic_I			] };
	key	<AD09> { [	Byelorussian_shortu,	Byelorussian_SHORTU,	Cyrillic_shcha,			Cyrillic_SHCHA			] };
	key	<AD12> { [	U2019,			apostrophe,		Cyrillic_hardsign,		Cyrillic_HARDSIGN		] };

	// Ukrainian (Yi is usually on <AD12>, but is it taken in our case).
	key <AC11> { [  Cyrillic_e,   Cyrillic_E,   Ukrainian_ie,   Ukrainian_IE    ] };
	key <AD11> { [  Cyrillic_ha,  Cyrillic_HA,  Ukrainian_yi,   Ukrainian_YI  ] };
	key <BKSL> { [  backslash,    bar,    Ukrainian_ghe_with_upturn,    Ukrainian_GHE_WITH_UPTURN  ] };

	include "level3(ralt_switch)"
};
