// Keyboard layouts for Greece.

// Original version:  Kostas Gewrgiou <gewrgiou@imbc.gr>
// Heavily modified by:  Vasilis Vasaitis <vvas@hal.csd.auth.gr>
// Converted to single-group form by:  Ivan Pascal <pascal@info.tsu.ru>
// More modifications by:  Web Dolphins® <foo@foofootus.eu>

default  partial alphanumeric_keys
xkb_symbols "basic" {

	include "gr(simple)"

	name[Group1] = "Greek";

	key <TLDE> {[  any,  any,          U2015                       ]}; // ―
	key <AE01> {[  any,  any,          U2022,          onesuperior ]}; // •
	key <AE02> {[  any,  any,        onehalf,          twosuperior ]};
	key <AE03> {[  any,  any,       sterling,        threesuperior ]};
	key <AE04> {[  any,  any,     onequarter,        threequarters ]};
	key <AE05> {[  any,  any,       EuroSign,             permille ]};
	key <AE06> {[  any,  any,          U03F0,            paragraph ]}; // ϰ ¶
	key <AE07> {[  any,  any,          U03D7,                U03CF ]}; // ϗ Ϗ
	key <AE08> {[  any,  any,          U20AF,             currency ]}; // ₯ ¤
	key <AE09> {[  any,  any,      brokenbar,  leftsinglequotemark ]};
	key <AE10> {[  any,  any,         degree, rightsinglequotemark ]};
	key <AE11> {[  any,  any,      plusminus                       ]};

	key <AD01> {[  any,  any, periodcentered                 ]};
	key <AD02> {[  any,  any,          U03DB,          U03DA ]}; // ϛ Ϛ
	key <AD03> {[  any,  any,       EuroSign,          U03F5 ]}; // € ϵ
	key <AD04> {[  any,  any,     registered,          U03F1 ]}; // ® ϱ
	key <AD06> {[  any,  any,          U03D2,            yen ]}; // ϒ ¥
	key <AD07> {[  any,  any,          U03D1,          U03F4 ]}; // ϑ ϴ
	key <AD08> {[  any,  any,          U037B,          U03FD ]}; // ͻ Ͻ
	key <AD09> {[  any,  any,          U03D9,          U03D8 ]}; // ϙ Ϙ
	key <AD10> {[  any,  any,          U03E1,          U03E0 ]}; // ϡ Ϡ
	key <AD11> {[  any,  any,     dead_tilde,    dead_macron ]};
	key <AD12> {[  any,  any,      dead_iota,     dead_breve ]};

	key <AC02> {[  any,  any,        section                 ]};
	key <AC03> {[  any,  any,      downarrow,        uparrow ]};
	key <AC04> {[  any,  any,          U03D5,      Greek_PHI ]}; // ϕ Φ
	key <AC05> {[  any,  any,          U03DD,          U03DC ]}; // ϝ Ϝ
	key <AC06> {[  any,  any,          U03F3,          U037F ]}; // ϳ Ϳ
	key <AC07> {[  any,  any,          U037C,          U03FE ]}; // ͼ Ͼ
	key <AC08> {[  any,  any,          U03DF,          U03DE ]}; // ϟ Ϟ
	key <AC09> {[  any,  any,          U03F2,          U03F9 ]}; // ϲ Ϲ
	key <AC10> {[  any,  any,     dead_acute,     dead_psili ]};
	key <AC11> {[  any,  any,     dead_grave,     dead_dasia ]};
	key <BKSL> {[  any,  any,        notsign                 ]};

	key <AB01> {[  any,  any,          U037D,          U03FF ]}; // ͽ Ͽ
	key <AB02> {[  any,  any,     rightarrow,      leftarrow ]};
	key <AB03> {[  any,  any,      copyright                 ]};
	key <AB04> {[  any,  any,          U03D6                 ]}; // ϖ
	key <AB05> {[  any,  any,          U03D0                 ]}; // ϐ
	key <AB06> {[  any,  any,          U0374,          U0375 ]}; // ʹ ͵
	key <AB07> {[  any,  any,          U03FB,          U03FA ]}; // ϻ Ϻ
	key <AB08> {[  any,  any,  guillemotleft,       ellipsis ]};
	key <AB09> {[  any,  any, guillemotright, periodcentered ]};

	include "level3(ralt_switch)"
};

partial alphanumeric_keys
xkb_symbols "simple" {

    name[Group1] = "Greek (simple)";

    key <TLDE>	{[              grave,      asciitilde ]}; // ` ~
    key <AE01>	{[                  1,          exclam ]}; // 1 !
    key <AE02>	{[                  2,              at ]}; // 2 @
    key <AE03>	{[                  3,      numbersign ]}; // 3 #
    key <AE04>	{[                  4,          dollar ]}; // 4 $
    key <AE05>	{[                  5,         percent ]}; // 5 %
    key <AE06>	{[                  6,     asciicircum ]}; // 6 ^
    key <AE07>	{[                  7,       ampersand ]}; // 7 &
    key <AE08>	{[                  8,        asterisk ]}; // 8 *
    key <AE09>	{[                  9,       parenleft ]}; // 9 (
    key <AE10>	{[                  0,      parenright ]}; // 0 )
    key <AE11>	{[              minus,      underscore ]}; // - _
    key <AE12>	{[              equal,            plus ]}; // = +

    key <AD01>	{[           semicolon,          colon ]}; // ; :
    key <AD02>	{[ Greek_finalsmallsigma,  Greek_SIGMA ]}; // ς Σ
    key <AD03>	{[       Greek_epsilon,  Greek_EPSILON ]}; // ε Ε
    key <AD04>	{[           Greek_rho,      Greek_RHO ]}; // ρ Ρ
    key <AD05>	{[           Greek_tau,      Greek_TAU ]}; // τ Τ
    key <AD06>	{[       Greek_upsilon,  Greek_UPSILON ]}; // υ Υ
    key <AD07>	{[         Greek_theta,    Greek_THETA ]}; // θ Θ
    key <AD08>	{[          Greek_iota,     Greek_IOTA ]}; // ι Ι
    key <AD09>	{[       Greek_omicron,  Greek_OMICRON ]}; // ο Ο
    key <AD10>	{[            Greek_pi,       Greek_PI ]}; // π Π

    key <AD11>	{[        bracketleft,       braceleft ]}; // [ {
    key <AD12>	{[       bracketright,      braceright ]}; // ] }

    key <AC01>	{[         Greek_alpha,    Greek_ALPHA ]}; // α Α
    key <AC02>	{[         Greek_sigma,    Greek_SIGMA ]}; // σ Σ
    key <AC03>	{[         Greek_delta,    Greek_DELTA ]}; // δ Δ
    key <AC04>	{[           Greek_phi,      Greek_PHI ]}; // φ Φ
    key <AC05>	{[         Greek_gamma,    Greek_GAMMA ]}; // γ Γ
    key <AC06>	{[           Greek_eta,      Greek_ETA ]}; // η Η
    key <AC07>	{[            Greek_xi,       Greek_XI ]}; // ξ Ξ
    key <AC08>	{[         Greek_kappa,    Greek_KAPPA ]}; // κ Κ
    key <AC09>	{[         Greek_lamda,    Greek_LAMDA ]}; // λ Λ
    key <AC10>	{[          dead_acute, dead_diaeresis ]}; // ´ ¨

    key <AC11>	{[         apostrophe,        quotedbl ]}; // ' "
    key <BKSL>	{[          backslash,             bar ]}; // \ |

    key <LSGT>	{[       guillemotleft, guillemotright ]}; // « »

    key <AB01>	{[          Greek_zeta,     Greek_ZETA ]}; // ζ Ζ
    key <AB02>	{[           Greek_chi,      Greek_CHI ]}; // χ Χ
    key <AB03>	{[           Greek_psi,      Greek_PSI ]}; // ψ Ψ
    key <AB04>	{[         Greek_omega,    Greek_OMEGA ]}; // ω Ω
    key <AB05>	{[          Greek_beta,     Greek_BETA ]}; // β Β
    key <AB06>	{[            Greek_nu,       Greek_NU ]}; // ν Ν
    key <AB07>	{[            Greek_mu,       Greek_MU ]}; // μ Μ

    key <AB08>	{[              comma,            less ]}; // , <
    key <AB09>	{[             period,         greater ]}; // . >
    key <AB10>	{[              slash,        question ]}; // / ?

    include "kpdl(comma)"
};

partial alphanumeric_keys
xkb_symbols "polytonic" {

    include "gr(basic)"

    name[Group1] = "Greek (polytonic)";

    key.type[Group1] = "FOUR_LEVEL";
    key <AE05>	{[ 5,            percent,          U2030,  U2031 ]}; // ‰ ‱

    key <AD02>	{[Greek_finalsmallsigma,Greek_SIGMA, U03D9,U03D8 ]}; // ϙ Ϙ
    key <AD10>	{[ Greek_pi,     Greek_PI,         U03D6,  U03D5 ]}; // ϖ ϕ
    key.type[Group1] = "THREE_LEVEL";
    key <AD11>	{[ dead_tilde,   dead_diaeresis,   dead_macron   ]}; // ~ ¨ ¯
    key <AD12>	{[ dead_iota,    none,             dead_breve    ]}; // ͺ   ˘

    key.type[Group1] = "FOUR_LEVEL";
    key <AC02>	{[ Greek_sigma,  Greek_SIGMA,      U03DB,  U03DA ]}; // ϛ Ϛ (stigmata)
    key <AC04>	{[ Greek_phi,    Greek_PHI,        U03DD,  U03DC ]}; // ϝ Ϝ
    key <AC07>	{[ Greek_xi,     Greek_XI,         U03F3,  U037F ]}; // ϳ Ϳ
    key <AC08>	{[ Greek_kappa,  Greek_KAPPA,      U03D7,  U03CF ]}; // ϗ Ϗ (kai symbols)

    key.type[Group1] = "THREE_LEVEL";
    key <AC10>	{[ dead_acute,   dead_psili                      ]};
    key.type[Group1] = "FOUR_LEVEL";
    key <AC11>	{[ dead_grave,   dead_dasia, apostrophe,quotedbl ]};

    key <AB05>	{[ Greek_beta,   Greek_BETA,       U03E1,  U03E0 ]}; // ϡ Ϡ
};

partial alphanumeric_keys
xkb_symbols "nodeadkeys" {

    include "gr(simple)"

    name[Group1] = "Greek (no dead keys)";

    key <AC10>	{[ semicolon, colon ]}; // ; :
};


// Greek layout rearranged as Colemak.
partial alphanumeric_keys
xkb_symbols "colemak" {

    include "gr(basic)"

    name[Group1] = "Greek (Colemak)";

    key <AD01>	{[           semicolon,          colon, periodcentered             ]};
    key <AD02>	{[ Greek_finalsmallsigma,  Greek_SIGMA,          U03DB,      U03DA ]};
    key <AD03>	{[           Greek_phi,      Greek_PHI,          U03D5,  Greek_PHI ]};
    key <AD04>	{[            Greek_pi,       Greek_PI,          U03E1,      U03E0 ]};
    key <AD05>	{[         Greek_gamma,    Greek_GAMMA,          U03DD,      U03DC ]};
    key <AD06>	{[            Greek_xi,       Greek_XI,          U037C,      U03FE ]};
    key <AD07>	{[         Greek_lamda,    Greek_LAMDA,          U03F2,      U03F9 ]};
    key <AD08>	{[         Greek_theta,    Greek_THETA,          U03D1,      U03F4 ]};
    key <AD09>	{[       Greek_upsilon,  Greek_UPSILON,          U03D2,        yen ]};
    key <AD10>	{[          dead_acute, dead_diaeresis,     dead_acute, dead_psili ]};

    key <AC01>	{[         Greek_alpha,    Greek_ALPHA                             ]};
    key <AC02>	{[           Greek_rho,      Greek_RHO,     registered,      U03F1 ]};
    key <AC03>	{[         Greek_sigma,    Greek_SIGMA,        section             ]};
    key <AC04>	{[           Greek_tau,      Greek_TAU                             ]};
    key <AC05>	{[         Greek_delta,    Greek_DELTA,      downarrow,    uparrow ]};
    key <AC06>	{[           Greek_eta,      Greek_ETA,          U03F3,      U037F ]};
    key <AC07>	{[            Greek_nu,       Greek_NU,          U0374,      U0375 ]};
    key <AC08>	{[       Greek_epsilon,  Greek_EPSILON,       EuroSign,      U03F5 ]};
    key <AC09>	{[          Greek_iota,     Greek_IOTA,          U037B,      U03FD ]};
    key <AC10>	{[       Greek_omicron,  Greek_OMICRON                             ]};

    key <AB01>	{[          Greek_zeta,     Greek_ZETA,          U037D,      U03FF ]};
    key <AB02>	{[           Greek_chi,      Greek_CHI,     rightarrow,  leftarrow ]};
    key <AB03>	{[           Greek_psi,      Greek_PSI,      copyright             ]};
    key <AB04>	{[         Greek_omega,    Greek_OMEGA,          U03D6             ]};
    key <AB05>	{[          Greek_beta,     Greek_BETA,          U03D0             ]};
    key <AB06>	{[         Greek_kappa,    Greek_KAPPA,          U03DF,      U03DE ]};
    key <AB07>	{[            Greek_mu,       Greek_MU,          U03FB,      U03FA ]};

    key <CAPS>	{[           BackSpace,      BackSpace,      BackSpace,  BackSpace ]};
};

// EXTRAS:

partial alphanumeric_keys
	xkb_symbols "sun_type6" {
	include "sun_vndr/gr(sun_type6)"
};

// Compatibility mapping
partial xkb_symbols "extended" {
    include "gr(basic)"
};
