// $XConsortium: macintosh /main/10 1996/01/24 12:17:35 kaleb $
//
//Copyright (c) 1996  X Consortium
//
//Permission is hereby granted, free of charge, to any person obtaining
//a copy of this software and associated documentation files (the
//"Software"), to deal in the Software without restriction, including
//without limitation the rights to use, copy, modify, merge, publish,
//distribute, sublicense, and/or sell copies of the Software, and to
//permit persons to whom the Software is furnished to do so, subject to
//the following conditions:
//
//The above copyright notice and this permission notice shall be
//included in all copies or substantial portions of the Software.
//
//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
//EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
//MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
//IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
//OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
//ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
//OTHER DEALINGS IN THE SOFTWARE.
//
//Except as contained in this notice, the name of the X Consortium shall
//not be used in advertising or otherwise to promote the sale, use or
//other dealings in this Software without prior written authorization
//from the X Consortium.
//
// $XFree86: xc/programs/xkbcomp/keycodes/macintosh,v 1.5 2001/10/03 07:44:22 alanh Exp $
//
default xkb_keycodes "macintosh" {

    minimum= 8;
    maximum= 134;

    <ESC>  = 61;
    <TLDE> = 58;
    <AE01> = 26;
    <AE02> = 27;
    <AE03> = 28;
    <AE04> = 29;
    <AE05> = 31;
    <AE06> = 30;
    <AE07> = 34;
    <AE08> = 36;
    <AE09> = 33;
    <AE10> = 37;
    <AE11> = 35;
    <AE12> = 32;
    <BKSP> = 59;

    <TAB>  = 56;
    <AD01> = 20;
    <AD02> = 21;
    <AD03> = 22;
    <AD04> = 23;
    <AD05> = 25;
    <AD06> = 24;
    <AD07> = 40;
    <AD08> = 42;
    <AD09> = 39;
    <AD10> = 43;
    <AD11> = 41;
    <AD12> = 38;
    <BKSL> = 50;

    <CAPS> = 65;
    <AC01> = 8;
    <AC02> = 9;
    <AC03> = 10;
    <AC04> = 11;
    <AC05> = 13;
    <AC06> = 12;
    <AC07> = 46;
    <AC08> = 48;
    <AC09> = 45;
    <AC10> = 49;
    <AC11> = 47;
    <RTRN> = 44;

    <LSGT> = 18;
    <AB01> = 14;
    <AB02> = 15;
    <AB03> = 16;
    <AB04> = 17;
    <AB05> = 19;
    <AB06> = 53;
    <AB07> = 54;
    <AB08> = 51;
    <AB09> = 55;
    <AB10> = 52;

    <SPCE> = 57;

    <LCTL> = 62;  // Left Control
    <LALT> = 63;  // Left Option
    <LFSH> = 64;  // Left Shift
    <RALT> = 66;  // Left Command
//    <RTSH> = 131; // Right Shift
//    <RALT> = 132; // Right Command
//    <RCTL> = 133; // Right Control
//    <RMTA> = 134; // Right Option

    <FK01> = 130;
    <FK02> = 128;
    <FK03> = 107;
    <FK04> = 126;
    <FK05> = 104;
    <FK06> = 105;
    <FK07> = 106;
    <FK08> = 108;
    <FK09> = 109;
    <FK10> = 117;
    <FK11> = 111;
    <FK12> = 119;

    <PRSC> = 113;
    <SCLK> = 115;
    <PAUS> = 121;

    <INS>  = 122;
    <HOME> = 123;
    <PGUP> = 124;
    <DELE> = 125;
    <END>  = 127;
    <PGDN> = 129;

    <UP>   = 70;
    <LEFT> = 67;
    <DOWN> = 69;
    <RGHT> = 68;

    <NMLK> = 79;
    <KPEQ> = 89;
    <KPDV> = 83;
    <KPMU> = 75;

    <KP7>  = 97;
    <KP8>  = 99;
    <KP9>  = 100;
    <KPSU> = 86;

    <KP4>  = 94;
    <KP5>  = 95;
    <KP6>  = 96;
    <KPAD> = 77;

    <KP1>  = 91;
    <KP2>  = 92;
    <KP3>  = 93;
    <KPEN> = 84;

    <KP0>  = 90;
    <KPDL> = 73;

    indicator 3 = "Scroll Lock";
    indicator 2 = "Num Lock";
    indicator 1 = "Caps Lock";

    alias <ALGR> = <RALT>;
};

xkb_keycodes "usb" {

    minimum= 8;
    maximum= 255;

    <ESC>  =  49;
    <AE01> =  38;
    <AE02> =  39;
    <AE03> =  40;
    <AE04> =  41;
    <AE05> =  42;
    <AE06> =  43;
    <AE07> =  44;
    <AE08> =  45;
    <AE09> =  46;
    <AE10> =  47;
    <AE11> =  53;
    <AE12> =  54;
    <BKSL> = 145;	// backslash JP only
    <BKSP> =  50;	// delete

    <TAB>  =  51;
    <AD01> =  28;
    <AD02> =  34;
    <AD03> =  16;
    <AD04> =  29;
    <AD05> =  31;
    <AD06> =  36;
    <AD07> =  32;
    <AD08> =  20;
    <AD09> =  26;
    <AD10> =  27;
    <AD11> =  55;
    <AD12> =  56;
    <RTRN> =  48;

    <LCTL> = 232;
    <AC01> =  12;
    <AC02> =  30;
    <AC03> =  15;
    <AC04> =  17;
    <AC05> =  18;
    <AC06> =  19;
    <AC07> =  21;
    <AC08> =  22;
    <AC09> =  23;
    <AC10> =  59;
    <AC11> =  60;
    <AC12> =  58;	// JP only
    <RCTL> = 236;

    <LFSH> = 233;
    <AB01> =  37;
    <AB02> =  35;
    <AB03> =  14;
    <AB04> =  33;
    <AB05> =  13;
    <AB06> =  25;
    <AB07> =  24;
    <AB08> =  62;
    <AB09> =  63;
    <AB10> =  64;
    <AB11> = 143;	// JP only
    <RTSH> = 237;	// Shift_R

    <CAPS> =  65;
    <LALT> = 234;
    <LMTA> = 235;
    <EISU> = 153;	// JP
    <SPCE> =  52;
    <KANA> = 152;	// JP
    <RMTA> = 239;
    <RALT> = 238;

    <FK01> =  66;
    <FK02> =  67;
    <FK03> =  68;
    <FK04> =  69;
    <FK05> =  70;
    <FK06> =  71;
    <FK07> =  72;
    <FK08> =  73;
    <FK09> =  74;
    <FK10> =  75;
    <FK11> =  76;
    <FK12> =  77;

    <HELP> =  81;
    <HOME> =  82;
    <PGUP> =  83;
    <DELE> =  84;
    <END>  =  85;
    <PGDN> =  86;

    <UP>   =  90;
    <LEFT> =  88;
    <DOWN> =  89;
    <RGHT> =  87;

    <KPCL> =  91;
    <KPEQ> = 111;
    <KPDV> =  92;
    <KPMU> =  93;

    <KP7>  = 103;
    <KP8>  = 104;
    <KP9>  = 105;
    <KPSU> =  94;

    <KP4>  = 100;
    <KP5>  = 101;
    <KP6>  = 102;
    <KPAD> =  95;

    <KP1>  =  97;
    <KP2>  =  98;
    <KP3>  =  99;
    <KPEN> =  96;

    <KP0>  = 106;
    <KPSP> = 141;
    <KPDL> = 107;

    indicator 1 = "Caps Lock";
};
