[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

geometry for ibook2



Hi X-Folks,

I've written an geometry file for the apple ibook2.
Included is the patch to the xkb directory of the actual
xlibs package in sid. I hope it will be useful to a bunch
of beginners. I'm not subscribed to the list, so If you
like to hear from me, cc to me.

Eric Böse-Wolf
diff -uNr xkb.orig/geometry/ibook2 xkb.new/geometry/ibook2
--- xkb.orig/geometry/ibook2	1970-01-01 01:00:00.000000000 +0100
+++ xkb.new/geometry/ibook2	2003-02-18 16:54:08.000000000 +0100
@@ -0,0 +1,173 @@
+// $XFree86: xc/programs/xkbcomp/geometry/macintosh,v 1.1 1999/05/23 05:27:50 dawes Exp $
+default xkb_geometry "ibook2" {
+
+    description= "ibook2";
+    width= 277;
+    height= 110;
+
+    shape.cornerRadius= 1;
+    shape "NORM" { { [ 18,18] }, { [2,1], [ 16,17] } };
+    shape "ALPHA" { { [ 18,9] }, { [2,0.5], [ 16,8] } };
+    shape "SPCL" { { [ 18.5,20] }, { [2,1], [ 17, 19] } };
+    shape "META" { { [ 22,20] }, { [2,1], [ 21, 19] } };
+    shape "BKSP" { { [ 29.2,18] }, { [2,1], [ 28,17] } };
+
+    shape "TAB"  { { [ 28,18] }, { [2,1], [ 26,17] } };
+    shape "BKSL" { { [ 28,18] }, { [2,1], [ 26,17] } };
+
+    shape "RTRN" { { [ 0,0], [19,0], [19,37], [4,37], [4,18], [0,18] }, 
+                   { [ 1,0.5], [18,0.5], [18,36], [5,36], [5,17], [1,17] } };
+ 
+    shape "CAPS" { { [ 32,18] }, { [2,1], [ 30,17] } };
+    shape "LCTL" { { [ 28,18] }, { [2,1], [ 26,17] } };
+    shape "LALT" { { [ 28,18] }, { [2,1], [ 26,17] } };
+    shape "LFSH" { { [ 23.6,18] }, { [2,1], [ 22,17] } };
+    shape "RCTL" { { [ 28,18] }, { [2,1], [ 26,17] } };
+    shape "RALT" { { [ 28,18] }, { [2,1], [ 26,17] } };
+    shape "RTSH" { { [ 43,18] }, { [2,1], [ 42,17] } };
+    shape "SPCE" { { [92.8,20] }, { [2,1], [91.8,19] } };
+    shape "KP0"  { { [ 37,18] }, { [2,1], [ 35,17] } };
+    shape "KPEN" { { [ 18,37] }, { [2,1], [ 16,36] } };
+
+    shape "LEDS" { cornerRadius= 0, { [ 76 ,20 ] } };
+    shape "LED"  { cornerRadius= 0, { [  5,  1 ] } };
+
+//    solid "LedPanel" {
+//	shape= "LEDS";
+//	top=  52;
+//	left= 375;
+//    };
+
+//    indicator.onColor= "green";
+//    indicator.offColor= "green30";
+//    indicator.top= 67;
+//    indicator.shape= "LED";
+//    indicator "NumLock"     { left= 379; };
+//   indicator "CapsLock"    { left= 404; };
+//    indicator "ScrollLock"  { left= 429; };
+text.top= 95;
+text.color= "black";
+text "FN"		{ left= 9; text="FN"; };
+//   text "CapsLockLabel"	{ left= 403; text="Caps\nLock"; };
+//   text "ScrollLockLabel"	{ left= 428; text="Scroll\nLock"; };
+
+    section.left= 0;
+    row.left= 1;
+    key.shape= "NORM";
+    key.gap=  0.7;
+
+    section "Function" {
+	top= 2;
+	row {
+	    top= 1;
+	    keys {  { <ESC>, "ALPHA" }, 
+                    { shape= "ALPHA", gap= 9.7, <FK01> },
+                    { <FK02>, "ALPHA" }, 
+                    { <FK03>, "ALPHA" }, 
+                    { <FK04>, "ALPHA" },
+                    { <FK05>, "ALPHA" }, 
+                    { shape= "ALPHA", gap= 10.4, <FK06> }, 
+                    { <FK07>, "ALPHA" }, 
+                    { <FK08>, "ALPHA" }, 
+                    { <FK09>, "ALPHA" },
+                    { <FK10>, "ALPHA" }, 
+                    { <FK11>, "ALPHA" }, 
+                    { shape= "ALPHA", gap= 11.9, <FK12> }
+	    };
+	};
+    }; // End of "Function" section
+
+    section "Alpha" {
+	top= 12;
+	row {
+	    top= 1;
+	    keys { <TLDE>, <AE01>, <AE02>, <AE03>, <AE04>,
+		   <AE05>, <AE06>, <AE07>, <AE08>, <AE09>,
+		   <AE10>, <AE11>, <AE12>, { <BKSP>, "BKSP" }
+	    };
+	};
+	row {
+	    top= 20;
+	    keys { { <TAB>, "TAB" },  <AD01>, <AD02>, <AD03>,
+                   <AD04>, <AD05>, <AD06>, <AD07>, <AD08>, <AD09>,
+                   <AD10>, <AD11>, <AD12>, { <RTRN>, "RTRN" }
+	    };
+	};
+	row {
+	    top= 39;
+	    keys { { <CAPS>, "CAPS" }, <AC01>, <AC02>, <AC03>,
+                   <AC04>, <AC05>, <AC06>, <AC07>, <AC08>, <AC09>,
+		   <AC10>, <AC11>, <BKSL>
+	    };
+	};
+	row {
+	    top= 58;
+	    keys { { <LFSH>, "LFSH" }, <LSGT>,  <AB01>, <AB02>, <AB03>,
+                   <AB04>, <AB05>, <AB06>, <AB07>, <AB08>, <AB09>,
+                   <AB10>, { <RTSH>, "RTSH" }
+	    };
+	};
+	row {
+	    top= 77;
+	    keys { { <FN>, "SPCL" }, 
+	           { <LCTL>, "SPCL" },
+                   { <LALT>, "SPCL" },
+                   { <RALT>, "META" },
+                   { <SPCE>, "SPCE" }, 
+                   { <RALT>, "META" },
+	           { <KPEN>, "SPCL" }
+	    };
+	};
+    }; // End of "Alpha" section
+
+    section "Editing" {
+	top= 12;
+	left= 216.7;
+//	row {
+//	    top= 1;
+//	    keys { <INS>, <HOME>, <PGUP> };
+//	};
+//        row {
+//	    top= 20;
+//	    keys { <DELE>, <END>, <PGDN> };
+//	};
+	row {
+	    top= 77;
+	    left= 19.65;
+	    keys { { <UP>, "ALPHA" } };
+	};
+	row {
+	    top= 87;
+	    keys { { <LEFT>, "ALPHA" },
+                   { <DOWN>, "ALPHA" },
+                   { <RGHT>, "ALPHA" }  };
+	};
+    }; // End of "Editing" section
+//
+//    // Begin of "Keypad" section
+//    section "Keypad" {
+//	top= 91;
+//	left= 375;
+//	row {
+//	    top= 1;
+//            keys { <NMLK>, <KPEQ>, <KPDV>, <KPMU> };
+//	};
+//row {
+//	    top= 20;
+//	    keys { <KP7>, <KP8>, <KP9>, <KPSU> };
+//	};
+//	row {
+//	    top= 39;
+//	    keys { <KP4>, <KP5>, <KP6>, <KPAD> };
+//	};
+//	row {
+//	    top= 58;
+//	    keys { <KP1>, <KP2>, <KP3>, { <KPEN>, "KPEN" } };
+//	};
+//	row {
+//	    top= 77;
+//	    keys { { <KP0>, "KP0" },  <KPDL> };
+//	};
+//    }; // End of "Keypad" section
+
+}; // End of "default" geometry
diff -uNr xkb.orig/geometry.dir xkb.new/geometry.dir
--- xkb.orig/geometry.dir	2003-02-18 16:02:04.000000000 +0100
+++ xkb.new/geometry.dir	2003-02-18 16:58:13.000000000 +0100
@@ -19,6 +19,7 @@
 -d------ -------- keytronic(FlexPro)
 -d------ -------- kinesis(model100)
 -d------ -------- macintosh(macintosh)
+-d------ -------- ibook2(ibook2)
 -d------ -------- microsoft(natural)
 -d------ -------- nec(pc98)
 -d------ -------- northgate(omnikey101)
diff -uNr xkb.orig/keycodes/ibook2 xkb.new/keycodes/ibook2
--- xkb.orig/keycodes/ibook2	1970-01-01 01:00:00.000000000 +0100
+++ xkb.new/keycodes/ibook2	2003-02-18 17:06:02.000000000 +0100
@@ -0,0 +1,357 @@
+// $Xorg: xfree86,v 1.3 2000/08/17 19:54:37 cpqbld Exp $
+
+
+
+
+// $XFree86: xc/programs/xkbcomp/keycodes/xfree86,v 3.15 2001/01/17 23:45:51 dawes Exp $
+
+// "standard" XFree86 codes, modified for ibook2
+// It seems that the "default" must be the first entry in the file.
+
+default xkb_keycodes "ibook2" {
+    include "ibook2(basic)"
+    <BKSL> =  51;
+    <LSGT> =  94;
+};
+
+xkb_keycodes "basic" {
+
+    minimum= 8;
+    maximum= 255;
+
+    <TLDE> =  49;
+    <AE01> =  10;
+    <AE02> =  11;
+    <AE03> =  12;
+    <AE04> =  13;
+    <AE05> =  14;
+    <AE06> =  15;
+    <AE07> =  16;
+    <AE08> =  17;
+    <AE09> =  18;
+    <AE10> =  19;
+    <AE11> =  20;
+    <AE12> =  21;
+    <BKSP> =  22;
+
+    <TAB>  =  23;
+    <AD01> =  24;
+    <AD02> =  25;
+    <AD03> =  26;
+    <AD04> =  27;
+    <AD05> =  28;
+    <AD06> =  29;
+    <AD07> =  30;
+    <AD08> =  31;
+    <AD09> =  32;
+    <AD10> =  33;
+    <AD11> =  34;
+    <AD12> =  35;
+    <RTRN> =  36;
+
+    <CAPS> =  66;
+    <AC01> =  38;
+    <AC02> =  39;
+    <AC03> =  40;
+    <AC04> =  41;
+    <AC05> =  42;
+    <AC06> =  43;
+    <AC07> =  44;
+    <AC08> =  45;
+    <AC09> =  46;
+    <AC10> =  47;
+    <AC11> =  48;
+
+    <LFSH> =  50;
+    <AB01> =  52;
+    <AB02> =  53;
+    <AB03> =  54;
+    <AB04> =  55;
+    <AB05> =  56;
+    <AB06> =  57;
+    <AB07> =  58;
+    <AB08> =  59;
+    <AB09> =  60;
+    <AB10> =  61;
+    <RTSH> =  62;
+
+    // ALT key should be Alt
+    <LALT> =  64;
+    // Right ALT key is AltGr, this gets mapped to the Apple key
+    <RALT> = 115;
+    
+    <LCTL> =  37;
+    <SPCE> =  65;
+    // These don't work for me, right keys give the same keycodes as left keys
+    <RCTL> = 109;
+
+    <ESC>  =   9;
+    <FK01> =  67;
+    <FK02> =  68;
+    <FK03> =  69;
+    <FK04> =  70;
+    <FK05> =  71;
+    <FK06> =  72;
+    <FK07> =  73;
+    <FK08> =  74;
+    <FK09> =  75;
+    <FK10> =  76;
+    <FK11> =  95;
+    <FK12> =  96;
+
+    <PRSC> = 111;
+    <SYRQ> =  92;
+    <SCLK> =  78;
+    <PAUS> = 110;
+    <BRK>  = 114;
+
+    <INS>  = 106;
+    <HOME> =  97;
+    <PGUP> =  99;
+    <DELE> = 107;
+    <END>  = 103;
+    <PGDN> = 105;
+
+    <UP>   =  98;
+    <LEFT> = 100;
+    <DOWN> = 104;
+    <RGHT> = 102;
+
+    <NMLK> =  77;
+    <KPDV> = 112;
+    <KPMU> =  63;
+    <KPSU> =  82;
+
+    <KP7>  =  79;
+    <KP8>  =  80;
+    <KP9>  =  81;
+    <KPAD> =  86;
+
+    <KP4>  =  83;
+    <KP5>  =  84;
+    <KP6>  =  85;
+
+    <KP1>  =  87;
+    <KP2>  =  88;
+    <KP3>  =  89;
+    <KPEN> = 108;
+
+    <KP0>  =  90;
+    <KPDL> =  91;
+
+    <FK13> =  118;
+    <FK14> =  119;
+    <FK15> =  120;
+    <FK16> =  121;
+    <FK17> =  122;
+    <KPDC> =  123;
+
+    // Keys that are generated on Japanese keyboards
+
+    alias <HZTG> = <TLDE>;	// Hankaku_Zenkaku toggle
+    alias <HKTG> = <FK15>;	// Hiragana_Katakana toggle
+    alias <AB11> = <KPDC>;	// backslash/underscore
+    <XFER> =   129;		// Henkan
+    <NFER> =   131;		// Muhenkan
+    <AE13> =   133;		// Yen
+
+    // Keys that are generated on Japanese and Brazillian keyboards
+    alias <AC12> = <BKSL>;
+
+    // Extended keys that may be generated on "Internet" keyboards.
+    // These are not standardised, hence the meaningless names.
+    // The entries commented out are never generated because the raw codes
+    // in those positions are already used for well-defined keys.
+
+    alias <XFER> = <I01>;
+    <I02> =   130;
+    alias <NFER> = <I03>;
+    <I04> =   132;
+    alias <AE13> = <I05>;
+    <I06> =   134;
+    <I07> =   135;
+    <I08> =   136;
+    <I09> =   137;
+    <I0A> =   138;
+    <I0B> =   139;
+    <I0C> =   140;
+    <I0D> =   141;
+    <I0E> =   142;
+    <I0F> =   143;
+    <I10> =   144;
+    <I11> =   145;
+    <I12> =   146;
+    <I13> =   147;
+    <I14> =   148;
+    <I15> =   149;
+    <I16> =   150;
+    <I17> =   151;
+    <I18> =   152;
+    <I19> =   153;
+    <I1A> =   154;
+    <I1B> =   155;
+    // <I1C> =   156;
+    // <I1D> =   157;
+    <I1E> =   158;
+    <I1F> =   159;
+    <I20> =   160;
+    <I21> =   161;
+    <I22> =   162;
+    <I23> =   163;
+    <I24> =   164;
+    <I25> =   165;
+    <I26> =   166;
+    <I27> =   167;
+    <I28> =   168;
+    <I29> =   169;
+    // <I2A> =   170;
+    <I2B> =   171;
+    <I2C> =   172;
+    <I2D> =   173;
+    <I2E> =   174;
+    <I2F> =   175;
+    <I30> =   176;
+    <I31> =   177;
+    <I32> =   178;
+    <I33> =   179;
+    <I34> =   180;
+    // <I35> =   181;
+    // <I36> =   182;
+    // <I37> =   183;
+    // <I38> =   184;
+    <I39> =   185;
+    <I3A> =   186;
+    <I3B> =   187;
+    <I3C> =   188;
+    // <I3D> =   189;
+    // <I3E> =   190;
+    // <I3F> =   191;
+    // <I40> =   192;
+    // <I41> =   193;
+    <I42> =   194;
+    <I43> =   195;
+    <I44> =   196;
+    <I45> =   197;
+    // <I46> =   198;
+    // <I47> =   199;
+    // <I48> =   200;
+    // <I49> =   201;
+    <I4A> =   202;
+    // <I4B> =   203;
+    // <I4C> =   204;
+    // <I4D> =   205;
+    // <I4E> =   206;
+    // <I4F> =   207;
+    // <I50> =   208;
+    // <I51> =   209;
+    // <I52> =   210;
+    // <I53> =   211;
+    <I54> =   212;
+    <I55> =   213;
+    <I56> =   214;
+    <I57> =   215;
+    <I58> =   216;
+    <I59> =   217;
+    <I5A> =   218;
+    // <I5B> =   219;
+    // <I5C> =   220;
+    // <I5D> =   221;
+    <I5E> =   222;
+    <I5F> =   223;
+    <I60> =   224;
+    <I61> =   225;
+    <I62> =   226;
+    <I63> =   227;
+    <I64> =   228;
+    <I65> =   229;
+    <I66> =   230;
+    <I67> =   231;
+    <I68> =   232;
+    <I69> =   233;
+    <I6A> =   234;
+    <I6B> =   235;
+    <I6C> =   236;
+    <I6D> =   237;
+    <I6E> =   238;
+    <I6F> =   239;
+    <I70> =   240;
+    <I71> =   241;
+    <I72> =   242;
+    <I73> =   243;
+    <I74> =   244;
+    <I75> =   245;
+    <I76> =   246;
+    <I77> =   247;
+    <I78> =   248;
+    <I79> =   249;
+    <I7A> =   250;
+    <I7B> =   251;
+    <I7C> =   252;
+    <I7D> =   253;
+    <I7E> =   254;
+    <I7F> =   255;
+
+    // Other codes never generated.  The XFree86 ddx never generates
+    // these codes.
+
+    // <U5D> =    93;
+    // <U7C> =   124;
+    // <U7D> =   125;
+    // <U7E> =   126;
+    // <U7F> =   127;
+    // <U80> =   128;
+
+    indicator 1 = "Caps Lock";
+    indicator 2 = "Num Lock";
+    indicator 3 = "Scroll Lock";
+
+    alias <ALGR> = <RALT>;
+};
+
+// What keyboard is this?
+
+xkb_keycodes "102" {
+    include "xfree86(xfree86)"
+
+    // There will be warnings from xkbcomp because of multiple definitions.
+
+    <RALT> = 122;
+    <RCTL> = 123;
+
+    <PRSC> = 121;
+    <PAUS> = 118;
+
+    <INS>  = 131;
+    <HOME> = 135;
+    <PGUP> = 119;
+    <DELE> = 129;
+    <END>  = 130;
+    <PGDN> = 134;
+
+    <UP>   = 128;
+    <LEFT> = 132;
+    <DOWN> = 120;
+    <RGHT> = 133;
+
+    <KPDV> = 125;
+
+    <KPEN> = 124;
+};
+
+
+// For japanese 106 keyboard. by tsuka(tsuka@kawalab.dnj.ynu.ac.jp)
+//
+// All of the keycodes here are now in the basic "xfree86" set.
+//
+xkb_keycodes "jp106" {
+    include "xfree86(xfree86)"
+};
+
+
+// For brazilian ABNT2 keyboard. by Ricardo Y. Igarashi(iga@that.com.br)
+xkb_keycodes "abnt2" {
+    include "xfree86(basic)"
+    <BKSL> = 94;
+};
+
+
diff -uNr xkb.orig/keycodes.dir xkb.new/keycodes.dir
--- xkb.orig/keycodes.dir	2003-02-18 16:02:05.000000000 +0100
+++ xkb.new/keycodes.dir	2003-02-18 16:58:53.000000000 +0100
@@ -19,6 +19,7 @@
 -------- -------- ibm(rs6k-101)
 -------- -------- ibm(rs6k-102)
 -d------ -------- macintosh(macintosh)
+-d------ -------- ibook2(ibook2)
 -d------ -------- powerpcps2(powerpcps2)
 -------- -------- sony(nwp5461)
 -d------ -------- xfree86(xfree86)
diff -uNr xkb.orig/rules/xfree86 xkb.new/rules/xfree86
--- xkb.orig/rules/xfree86	2003-02-18 16:02:05.000000000 +0100
+++ xkb.new/rules/xfree86	2003-02-18 16:53:28.000000000 +0100
@@ -33,6 +33,7 @@
   rapidaccess	=       xfree86         pc(pc104)
   rapidaccess2	=       xfree86         pc(pc104)
   chicony	=       xfree86         pc(pc104)
+  ibook2	=	ibook2		ibook2(ibook2)
   dell		=	xfree86		pc(pc104)
   macintosh	=	xfree86		macintosh(macintosh)
   macintosh_old	=	macintosh	macintosh(macintosh)
@@ -54,6 +55,7 @@
   pc102		nodeadkeys	=	en_US(pc102%_v)+%l%(v)
   pc104		nodeadkeys	=	en_US(pc104%_v)+%l%(v)
   pc105		nodeadkeys	=	en_US(pc105%_v)+%l%(v)
+  ibook2	nodeadkeys	=	macintosh/us(extended)+macintosh/%l%(v)
   microsoft	nodeadkeys	=	en_US(pc104%_v)+%l%(v)
   macintosh	nodeadkeys	=	macintosh/us(extended)+macintosh/%l%(v)
   powerpcps2	nodeadkeys	=	en_US(pc104%_v)+%l%(v)
@@ -119,6 +121,9 @@
   rapidaccess2	en_US	=	en_US(pc104)+inet(rapidaccess2)
   rapidaccess2	*	=	en_US(pc104)+inet(rapidaccess2)+%l%(v)
   chicony	us	=	us(pc104)+inet(chicony)
+  ibook2	us	=	macintosh/us(extended)
+  ibook2	en_US	=	macintosh/us(extended)
+  ibook2	*	=	macintosh/us(extended)+macintosh/%l%(v)
   chicony	en_US	=	en_US(pc104)+inet(chicony)
   chicony	*	=	en_US(pc104)+inet(chicony)+%l%(v)
   dell		us	=	us(pc104)+inet(dell)
diff -uNr xkb.orig/rules/xfree86.lst xkb.new/rules/xfree86.lst
--- xkb.orig/rules/xfree86.lst	2003-02-18 16:02:05.000000000 +0100
+++ xkb.new/rules/xfree86.lst	2003-02-18 16:57:45.000000000 +0100
@@ -32,6 +32,7 @@
   rapidaccess2	IBM Rapid Access II
   chicony	Chicony Internet Keyboard
   dell		Dell Internet Keyboard
+  ibook2        Apple IBook Keyboard
 
 
 // The entries here should be ordered as follows:
-- 
Bitte senden Sie mir keine Word- oder PowerPoint-Anhänge.
Siehe http://www.fsf.org/philosophy/no-word-attachments.de.html

Peitsch mich, schlag mich, lass mich ipchains verwenden.

Reply to: