// $XKeyboardConfig$

// Hellenic keyboard map for X.org
//
// Original version:
//   Kostas Gewrgiou <gewrgiou@imbc.gr>
// Heavily modified and maintained by:
//   Vasilis Vasaitis <vvas@hal.csd.auth.gr>
// Originally converted to single group form by:
//   Ivan Pascal <pascal@info.tsu.ru>

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

	include "eurosign(e)"
	include "eurosign(5)"
	include "gr(simple)"
	include "kpdl(comma)"
	include "level3(ralt_switch)"

	key <AB01> { [       NoSymbol,       NoSymbol,          U037D,          U03FF ] };
	key <AB02> { [       NoSymbol,       NoSymbol,     rightarrow,      leftarrow ] };
	key <AB03> { [       NoSymbol,       NoSymbol,      copyright                 ] };
	key <AB04> { [       NoSymbol,       NoSymbol,          U03D6                 ] };
	key <AB05> { [       NoSymbol,       NoSymbol,          U03D0                 ] };
	key <AB06> { [       NoSymbol,       NoSymbol,          U0374,          U0375 ] };
	key <AB07> { [       NoSymbol,       NoSymbol,          U03FB,          U03FA ] };
	key <AB08> { [       NoSymbol,       NoSymbol,  guillemotleft                 ] };
	key <AB09> { [       NoSymbol,       NoSymbol, guillemotright, periodcentered ] };
	key <AC03> { [       NoSymbol,       NoSymbol,      downarrow,        uparrow ] };
	key <AC04> { [       NoSymbol,       NoSymbol,          U03D5                 ] };
	key <AC05> { [       NoSymbol,       NoSymbol,          U03DD,          U03DC ] };
	key <AC07> { [       NoSymbol,       NoSymbol,          U037C,          U03FE ] };
	key <AC08> { [       NoSymbol,       NoSymbol,          U03DF,          U03DE ] };
	key <AC09> { [       NoSymbol,       NoSymbol,          U03F2,          U03F9 ] };
	key <AC10> { [       NoSymbol,       NoSymbol,     dead_acute,     dead_psili ] };
	key <AC11> { [       NoSymbol,       NoSymbol,     dead_grave,     dead_dasia ] };
	key <AD01> { [       NoSymbol,       NoSymbol, periodcentered                 ] };
	key <AD02> { [       NoSymbol,       NoSymbol,          U03DB,          U03DA ] };
	key <AD04> { [       NoSymbol,       NoSymbol,     registered,          U03F1 ] };
	key <AD07> { [       NoSymbol,       NoSymbol,          U03D1,          U03F4 ] };
	key <AD08> { [       NoSymbol,       NoSymbol,          U037B,          U03FD ] };
	key <AD10> { [       NoSymbol,       NoSymbol,          U03E1,          U03E0 ] };
	key <AD11> { [       NoSymbol,       NoSymbol,     dead_tilde,    dead_macron ] };
	key <AD12> { [       NoSymbol,       NoSymbol,      dead_iota,     dead_breve ] };
	key <AE01> { [       NoSymbol,       NoSymbol,       NoSymbol,    onesuperior ] };
	key <AE02> { [       NoSymbol,       NoSymbol,        onehalf,    twosuperior ] };
	key <AE03> { [       NoSymbol,       NoSymbol,       sterling,  threesuperior ] };
	key <AE04> { [       NoSymbol,       NoSymbol,     onequarter,  threequarters ] };
	key <AE07> { [       NoSymbol,       NoSymbol,          U03F0                 ] };
	key <AE10> { [       NoSymbol,       NoSymbol,         degree                 ] };
};

partial alphanumeric_keys alternate_group
xkb_symbols "simple" {

    include "gr(bare)"

    name[Group1] = "Greece - 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 <AD11> { [  bracketleft,   braceleft ] }; // [ {
    key <AD12> { [ bracketright,  braceright ] }; // [ {

    key <AC11> { [   apostrophe,    quotedbl ] }; // ' "

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

    include "kpdl(comma)"
};

hidden partial alphanumeric_keys alternate_group
xkb_symbols "bare" {

    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 <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 <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 <LSGT> { [         guillemotleft, guillemotright ] }; // « »
};

// ===========================================================================================
// Greek - Extended                                                                          |
// ===========================================================================================
//
// ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┲━━━━━━━━━━━┓
// │ ~   │ !   │ @   │ #   │ $   │ %   │ ^   │ &   │ *   │ (   │ )   │ _   │ +   ┃Backspace  ┃
// │ `   │ 1   │ 2   │ 3 £ │ 4   │ 5 € │ 6   │ 7   │ 8   │ 9   │ 0 ° │ - ± │ =   ┃           ┃
// ┢━━━━━┷━┱───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┺━┳━━━━━━━━━┫
// ┃       ┃ :   │ Σ   │ Ε   │ Ρ   │ Τ   │ Υ   │ Θ   │ Ι   │ Ο   │ Π   │ {   │ }   ┃Enter    ┃
// ┃Tab    ┃ ; · │ ς   │ ε € │ ρ ® │ τ   │ υ   │ θ   │ ι   │ ο   │ π   │ [   │ ]   ┃         ┃
// ┣━━━━━━━┻┱────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┺┓        ┃
// ┃Caps    ┃ Α   │ Σ   │ Δ   │ Φ   │ Γ   │ Η   │ Ξ   │ Κ   │ Λ   │ ¨   │ "   │ |   ┃        ┃
// ┃Lock    ┃ α   │ σ   │ δ   │ φ   │ γ   │ η   │ ξ   │ κ   │ λ   │ ´   │ '   │ \   ┃        ┃
// ┣━━━━━━━┳┹────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴────┲┷━━━━━┻━━━━━━━━┫
// ┃       ┃ »   │ Ζ   │ Χ   │ Ψ   │ Ω   │ Β   │ Ν   │ Μ   │ <   │ >   │ ?   ┃               ┃
// ┃Shift  ┃ «   │ ζ   │ χ   │ ψ © │ ω   │ β   │ ν   │ μ   │ , « │ . » │ /   ┃Shift          ┃
// ┣━━━━━━━╋━━━━━┷━┳━━━┷━━━┱─┴─────┴─────┴─────┴─────┴─────┴──┲━━┷━━━━┳┷━━━━━┻┳━━━━━━━┳━━━━━━┫
// ┃       ┃       ┃       ┃                                  ┃       ┃       ┃       ┃      ┃
// ┃Ctrl   ┃Meta   ┃Alt    ┃              Space               ┃AltGr  ┃Meta   ┃Menu   ┃Ctrl  ┃
// ┗━━━━━━━┻━━━━━━━┻━━━━━━━┹──────────────────────────────────┺━━━━━━━┻━━━━━━━┻━━━━━━━┻━━━━━━┛

partial alphanumeric_keys alternate_group
xkb_symbols "extended" {

    include "gr(simple)"

    name[Group1] = "Greece - Extended";

    key.type[Group1] = "THREE_LEVEL";

    key <AE03> { [ NoSymbol, NoSymbol,       sterling ] }; // £
    key <AE10> { [ NoSymbol, NoSymbol,         degree ] }; // °
    key <AE11> { [ NoSymbol, NoSymbol,      plusminus ] }; // ±

    key <AD01> { [ NoSymbol, NoSymbol, periodcentered ] }; // ·
    key <AD04> { [ NoSymbol, NoSymbol,     registered ] }; // ®

    key <AB03> { [ NoSymbol, NoSymbol,      copyright ] }; // ©
    key <AB08> { [ NoSymbol, NoSymbol,  guillemotleft ] }; // «
    key <AB09> { [ NoSymbol, NoSymbol, guillemotright ] }; // »

    include "level3(ralt_switch)"
    include "eurosign(5)"
    include "eurosign(e)"
};

partial alphanumeric_keys alternate_group
xkb_symbols "polytonic" {

    include "gr(extended)"

    name[Group1] = "Greece - Polytonic";

    key.type[Group1] = "THREE_LEVEL";

    key <AD11> { [ dead_tilde, dead_diaeresis, dead_macron ] }; // ~ ¨ ¯
    key <AD12> { [  dead_iota,     VoidSymbol,  dead_breve ] }; // ͺ   ˘

    key <AC10> { [ dead_acute, dead_psili  ] }; // ´ ̓ 
    key <AC11> { [ dead_grave, dead_dasia  ] }; // ` ̔
};

partial alphanumeric_keys alternate_group
xkb_symbols "nodeadkeys" {

    include "gr(simple)"

    name[Group1] = "Greece - Eliminate dead keys";

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