// $XKeyboardConfig$

// based on
// Estonian XKB-keymap by Ville Hallik <ville@linux.ee>
//
// $XFree86: xc/programs/xkbcomp/symbols/ee,v 1.2 2002/11/22 04:03:28 dawes Exp $

partial default alphanumeric_keys
xkb_symbols "basic" {

    // Describes the differences between a very simple en_US
    // keyboard and a very simple Estonian keyboard
    // This layout conforms to both EVS8:1993 and EVS8:2000 standards

    include "latin(type4)"

    name[Group1]="Estonia";

    key <AE03>	{ [         3, numbersign,     sterling,     sterling ]	};
    key <AE04>	{ [         4,   currency,       dollar,       dollar ]	};
    key <AE11>	{ [      plus,   question,    backslash, questiondown ]	};
    key <AE12>	{ [dead_acute, dead_grave,        grave,   apostrophe ]	};

    key <AD11>	{ [udiaeresis, Udiaeresis, dead_diaeresis, dead_abovering ] };
    key <AD12>	{ [    otilde,     Otilde,      section,  dead_macron ]	};

    key <AC02>	{ [         s,          S,       scaron,       Scaron ]	};
    key <AC10>	{ [odiaeresis, Odiaeresis,   dead_acute, dead_doubleacute ] };
    key <AC11>	{ [adiaeresis, Adiaeresis,  asciicircum,   dead_caron ]	};
    key <TLDE>	{ [dead_caron, dead_tilde,      notsign,      notsign ]	};

    key <BKSL>	{ [apostrophe,   asterisk,      onehalf,   dead_breve ]	};
    key <AB01>	{ [         z,          Z,       zcaron,       Zcaron ]	};
    key <AB08>	{ [     comma,  semicolon,         less,     multiply ]	};
    key <AB09>	{ [    period,      colon,      greater,     division ]	};

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

partial alphanumeric_keys
xkb_symbols "nodeadkeys" {

    // Modifies the basic Estonian layout to eliminate all dead keys

    include "ee(basic)"
    name[Group1]="Estonia - Eliminate dead keys";

    key <TLDE>	{ [asciicircum,asciitilde ]	};
    key <AE12>	{ [apostrophe,      grave ]	};
    key <AD11>	{ [udiaeresis, Udiaeresis,    diaeresis,       degree ]	};
    key <AD12>	{ [    otilde,     Otilde,      section,       macron ]	};
    key <AC10>	{ [odiaeresis, Odiaeresis,        acute,  doubleacute ]	};
    key <AC11>	{ [adiaeresis, Adiaeresis,  asciicircum,        caron ]	};
    key <BKSL>	{ [apostrophe,   asterisk,      onehalf,        breve ]	};
    key <AB10>	{ [     minus, underscore, dead_belowdot,    abovedot ]	};
};

// Dvorak with Estonian characters
partial alphanumeric_keys
xkb_symbols "dvorak" {
   include "us(dvorak)"
   name[Group1]= "Estonia - Dvorak";
   
    key <AE03>	{ [         3, numbersign,   sterling ]	};
    key <AE04>	{ [         4,     dollar,    section,   currency ]	};
    key <AE08>	{ [         8,   asterisk,    onehalf ]	};

    key <AC01>	{ [         a,          A, adiaeresis, Adiaeresis ]	};
    key <AC02>	{ [         o,          O,     otilde,     Otilde ]	};
    key <AC03>	{ [         e,          E, odiaeresis, Odiaeresis ]	};
    key <AC04>	{ [         u,          U, udiaeresis, Udiaeresis ]	};
    key <AC10>	{ [         s,          S,     scaron,     Scaron ]	};   
    key <AB10>	{ [         z,          Z,     zcaron,     Zcaron ]	};

    include "level3(ralt_switch)"
    include "kpdl(comma)"
    include "eurosign(5)"
};

// Estonian few characters on basic US keymap.
// by Elan Ruusamäe <glen@delfi.ee>
partial alphanumeric_keys
xkb_symbols "us" {
    include "us(euro)"
    name[Group1] = "Estonia - US keyboard with Estonian letters";

    // ž, Ž
    key <AB01>	{ [           z,  Z,          zcaron,     Zcaron     ]	};
    // ¢
    key <AB03>	{ [           c,  C,          cent,       cent       ]	};
    // š, Š
    key <AC02>	{ [           s,  S,          scaron,     Scaron     ]	};
    key <AC10>	{ [ semicolon,    colon,      odiaeresis, Odiaeresis ]	};
    key <AC11>	{ [ quoteright,   quotedbl,   adiaeresis, Adiaeresis ]	};
    key <AD11>	{ [ bracketleft,  braceleft,  udiaeresis, Udiaeresis ]	};
    key <AD12>	{ [ bracketright, braceright, otilde,     Otilde     ]	};
    // £
    key <AE03>	{ [           3,  numbersign, sterling,   sterling   ]	};

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