// $XKeyboardConfig: xkbdesc/xkeyboard-config/symbols/pt,v 1.10 2006-10-03 22:47:43 svu Exp $

// based on a keyboard map from an 'xkb/symbols/pt' file
//
// $XFree86: xc/programs/xkbcomp/symbols/pt,v 1.2 2002/11/22 04:03:28 dawes Exp $

partial default alphanumeric_keys
xkb_symbols "basic" {

    include "latin(type4)"

    name[Group1]="Portugal";

    key <LSGT>  { [      less,    greater ] };
    key <AE03>	{ [         3, numbersign,     sterling,     sterling ]	};
    key <AE04>	{ [         4,     dollar,      section,       dollar ]	};
    key <AE11>	{ [apostrophe,   question,    backslash, questiondown ]	};
    key <AE12>	{ [guillemotleft, guillemotright, dead_cedilla, dead_ogonek ] };

    key <AD11>	{ [      plus,   asterisk, dead_diaeresis, dead_abovering ] };
    key <AD12>	{ [dead_acute, dead_grave,   dead_tilde,  dead_macron ]	};

    key <AC10>	{ [  ccedilla,   Ccedilla,   dead_acute, dead_doubleacute ] };
    key <AC11>	{ [ masculine, ordfeminine, dead_circumflex,   dead_caron ] };
    key <TLDE>	{ [ backslash,        bar,      notsign,      notsign ]	};

    key <BKSL>	{ [dead_tilde, dead_circumflex, dead_grave, dead_breve]	};

    include "level3(ralt_switch)"
};

partial alphanumeric_keys
xkb_symbols "Sundeadkeys" {

    include "pt(basic)" // for consistent naming

    key <AD11>	{ [plus,   asterisk, SunFA_Diaeresis, SunFA_Diaeresis ]	};
    key <BKSL>	{ [SunFA_Tilde, SunFA_Circum ]	};
    key <AD12>	{ [SunFA_Acute, SunFA_Grave ]	};
};

partial alphanumeric_keys
xkb_symbols "sundeadkeys" {
    include "pt(Sundeadkeys)" // for consistent naming

    name[Group1]="Portugal - Sun dead keys";
};

partial alphanumeric_keys
xkb_symbols "nodeadkeys" {

    include "pt(basic)" // for consistent naming

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

    key <AE12>	{ [guillemotleft, guillemotright, cedilla,     ogonek ]	};
    key <AD11>	{ [      plus,   asterisk,     quotedbl,     quotedbl ]	};
    key <AD12>	{ [     acute,      grave ]	};
    key <AC10>	{ [  ccedilla,   Ccedilla,        acute,  doubleacute ]	};
    key <AC11>	{ [ masculine, ordfeminine, asciicircum,        caron ]	};
    key <BKSL>	{ [asciitilde, asciicircum ]	};
    key <AB10>	{ [     minus, underscore, dead_belowdot,    abovedot ]	};
};

// mac version from Ricardo Cabral <bfe00991@mail.telepac.pt>
// Copied from macintosh_vndr/pt
partial alphanumeric_keys 
xkb_symbols "mac" {

    // Describes the differences between a very simple en_US
    // keyboard and a very simple Portuguese keybaord

    include "pt"
    name[Group1]= "Portugal - Macintosh";

    key <AE06>	{ [         6,  ampersand, threequarters, fiveeighths ]	};
    key <AE08>	{ [         8,  parenleft,  bracketleft,    braceleft ]	};
    key <AE09>	{ [         9, parenright, bracketright,   braceright ]	};
    key <AE12>	{ [      plus,   asterisk, dead_diaeresis     ]	};
    key <AC11>	{ [ dead_tilde, dead_circumflex       ]	};
    key <AD11>	{ [ masculine, ordfeminine            ]	};
    key <BKSL>	{ [ backslash,        bar,   dead_grave,   dead_breve ]	};
    key <TLDE>	{ [     grave, asciitilde,      notsign,      notsign ]	};
};

partial alphanumeric_keys 
xkb_symbols "mac_sundeadkeys" {
    include "pt(mac)"
    name[Group1]= "Portugal - Macintosh, Sun dead keys";
    
    key <AE12> {	[	     plus,        asterisk,  SunFA_Diaeresis, SunFA_Diaeresis      ]	};
    key <AC11> {	[     SunFA_Tilde,    SunFA_Circum	]	};
    key <AD12> {	[     SunFA_Acute,     SunFA_Grave 	]	};
};

partial alphanumeric_keys 
xkb_symbols "mac_nodeadkeys" {
    include "pt(mac)"
    name[Group1]= "Portugal - Macintosh, eliminate dead keys";

    key <AE12> {	[	     plus,        asterisk, 	 quotedbl,        quotedbl      ]	};
    key <AC11> {	[      asciitilde,     asciicircum	]	};
    key <AD12> {	[	    acute,           grave 	]	};
};
