Index: geometry/Makefile.am =================================================================== RCS file: /cvs/xlibs/xkbdesc/geometry/Makefile.am,v retrieving revision 1.3 diff -u -r1.3 Makefile.am --- geometry/Makefile.am 6 Aug 2005 00:47:56 -0000 1.3 +++ geometry/Makefile.am 31 Aug 2006 15:25:50 -0000 @@ -3,7 +3,7 @@ geomdir = $(xkb_base)/geometry dist_geom_DATA = \ -amiga ataritt chicony \ +amiga apple ataritt chicony \ dell everex fujitsu \ hp keytronic kinesis \ macintosh microsoft nec \ Index: geometry/apple =================================================================== RCS file: geometry/apple diff -N geometry/apple --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ geometry/apple 31 Aug 2006 15:25:51 -0000 @@ -0,0 +1,238 @@ +default xkb_geometry "laptop78" { + + description= "Apple Laptop 78-key (US)"; + width= 273; + height= 110; + + shape.cornerRadius= 0; + shape "ESC" { { [ 21,9] }, cornerRadius=1, { [0,1], [ 19,8] } }; + shape "FUNC" { { [ 18,9] }, cornerRadius=1, { [2,1], [ 16,8] } }; + shape "EJCT" { { [ 20,9] }, cornerRadius=1, { [2,1], [ 20,8] } }; + shape "DEGR" { { [ 16,18] }, cornerRadius=1, { [0,2], [ 14,16] } }; + shape "NORM" { { [ 18,18] }, cornerRadius=1, { [2,2], [ 16,16] } }; + shape "BKSP" { { [ 25,18] }, cornerRadius=1, { [2,2], [ 25,16] } }; + shape "TABK" { { [ 24,18] }, cornerRadius=1, { [0,2], [ 22,16] } }; + shape "BKSL" { { [ 17,18] }, cornerRadius=1, { [2,2], [17,16] } }; + shape "RTRN" { { [ 31,18] }, cornerRadius=1, { [2,2], [31,16] } }; + shape "CAPS" { { [ 29,18] }, cornerRadius=1, { [0,2], [ 27,16] } }; + shape "LFSH" { { [ 40,18] }, cornerRadius=1, { [0,2], [ 38,16] } }; + shape "RTSH" { { [ 39,18] }, cornerRadius=1, { [2,2], [ 39,16] } }; + shape "APPL" { { [ 23,18] }, cornerRadius=1, { [2,2], [ 21,16] } }; + shape "SPCE" { { [ 94,18] }, cornerRadius=1, { [2,2], [ 92,16] } }; + shape "ARRO" { { [ 17,9] }, cornerRadius=1, { [2,1], [ 15,8] } }; + + shape "LED" { cornerRadius= 1, { [ 2, 2 ] } }; + + indicator.onColor= "green"; + indicator.offColor= "gray"; + indicator.shape= "LED"; + indicator "Num Lock" { top=4; left= 119; }; + indicator "Caps Lock" { top=53; left= 4; }; + + section.left=0; + row.left= 1; + key.shape= "FUNC"; + key.gap= 1; + section "Function" { + top= 0; + row { + top= 1; + keys { {, "ESC" }, + , , , , + , , , , + , , , , + {, "EJCT" } + }; + }; + }; // End of "Function" section + + key.shape= "NORM"; + section "Alpha" { + top= 10; + row { + top= 1; + keys { {, "DEGR"}, + , , , , + , , , , + , , , , + { , "BKSP" } + }; + }; + row { + top= 20; + keys { { , "TABK"}, + , , , , , + , , , , , + , , + { , "BKSL" } + }; + }; + row { + top= 39; + keys { { , "CAPS" }, + , , , , , + , , , , , + , + { , "RTRN" } + }; + }; + row { + top= 58; + keys { { , "LFSH"}, + , , , , , + , , , , , + { , "RTSH" } + }; + }; + row { + top= 77; + keys { {, "DEGR"}, + , , + {, "APPL"}, + {, "SPCE" }, + {, "APPL"}, + + }; + }; + + }; // End of "Alpha" section + + key.shape= "ARRO"; + section "Editing" { + top = 86; + left = 217; + row { + top= 1; + left= 19; + keys { }; + }; + row { + top= 10; + keys { , , }; + }; + }; // End of "Editing" section + + alias = ; + alias = ; + +}; + +xkb_geometry "laptop79" { + + description= "Apple Laptop 79-key (Intl)"; + width= 273; + height= 110; + + shape.cornerRadius= 0; + shape "ESC" { { [ 21,9] }, cornerRadius=1, { [0,1], [ 19,8] } }; + shape "FUNC" { { [ 18,9] }, cornerRadius=1, { [2,1], [ 16,8] } }; + shape "EJCT" { { [ 20,9] }, cornerRadius=1, { [2,1], [ 20,8] } }; + shape "DEGR" { { [ 16,18] }, cornerRadius=1, { [0,2], [ 14,16] } }; + shape "NORM" { { [ 18,18] }, cornerRadius=1, { [2,2], [ 16,16] } }; + shape "BKSP" { { [ 25,18] }, cornerRadius=1, { [2,2], [ 25,16] } }; + shape "TABK" { { [ 24,18] }, cornerRadius=1, { [0,2], [ 22,16] } }; + shape "RTRN" { { [ 0,0], [17,0], [17,37], [5,37], [5, 18], [0,18], [0,0] }, + cornerRadius=1, + { [ 2,2], [15,2], [15,35], [7,35], [7, 16], [2,16] } + }; + shape "CAPS" { { [ 29,18] }, cornerRadius=1, { [0,2], [ 27,16] } }; + shape "LFSH" { { [ 21,18] }, cornerRadius=1, { [0,2], [ 19,16] } }; + shape "RTSH" { { [ 39,18] }, cornerRadius=1, { [2,2], [ 39,16] } }; + shape "APPL" { { [ 23,18] }, cornerRadius=1, { [2,2], [ 21,16] } }; + shape "SPCE" { { [ 94,18] }, cornerRadius=1, { [2,2], [ 92,16] } }; + shape "ARRO" { { [ 17,9] }, cornerRadius=1, { [2,1], [ 15,8] } }; + + shape "LED" { cornerRadius= 1, { [ 2, 2 ] } }; + + indicator.onColor= "green"; + indicator.offColor= "gray"; + indicator.shape= "LED"; + indicator "Num Lock" { top=4; left= 119; }; + indicator "Caps Lock" { top=53; left= 4; }; + + section.left=0; + row.left= 1; + key.shape= "FUNC"; + key.gap= 1; + section "Function" { + top= 0; + row { + top= 1; + keys { {, "ESC" }, + , , , , + , , , , + , , , , + {, "EJCT" } + }; + }; + }; // End of "Function" section + + key.shape= "NORM"; + section "Alpha" { + top= 10; + row { + top= 1; + keys { {, "DEGR"}, + , , , , + , , , , + , , , , + { , "BKSP" } + }; + }; + row { + top= 20; + keys { { , "TABK"}, + , , , , , + , , , , , + , , { , "RTRN" } + }; + }; + row { + top= 39; + keys { { , "CAPS" }, + , , , , , + , , , , , + , + }; + }; + row { + top= 58; + keys { { , "LFSH"}, + , , , , , , + , , , , , + { , "RTSH" } + }; + }; + row { + top= 77; + keys { {, "DEGR"}, + , , + {, "APPL"}, + {, "SPCE" }, + {, "APPL"}, + + }; + }; + + }; // End of "Alpha" section + + key.shape= "ARRO"; + section "Editing" { + top = 86; + left = 217; + row { + top= 1; + left= 19; + keys { }; + }; + row { + top= 10; + keys { , , }; + }; + }; // End of "Editing" section + + alias = ; + alias = ; + +}; // End of "default" geometry + Index: keycodes/macintosh =================================================================== RCS file: /cvs/xlibs/xkbdesc/keycodes/macintosh,v retrieving revision 1.2 diff -u -r1.2 macintosh --- keycodes/macintosh 26 Mar 2006 22:16:07 -0000 1.2 +++ keycodes/macintosh 31 Aug 2006 15:25:51 -0000 @@ -37,6 +37,15 @@ = 157; }; + +xkb_keycodes "macbook" { + include "macintosh" + +// MacBook keyboards switch TLDE and LSGT keycodes + = 94; + = 49; +}; + xkb_keycodes "old" { minimum= 8; Index: keycodes/xfree86 =================================================================== RCS file: /cvs/xlibs/xkbdesc/keycodes/xfree86,v retrieving revision 1.2 diff -u -r1.2 xfree86 --- keycodes/xfree86 8 Apr 2006 01:18:27 -0000 1.2 +++ keycodes/xfree86 31 Aug 2006 15:25:51 -0000 @@ -295,6 +295,9 @@ = 254; = 255; + // MacBooks generate 0x65 for the lower brightness key + = 101; + // Codes generated for scancodes 0x59-0x5f, 0x62-0x76 = 157; // = 170; // @@ -411,5 +414,3 @@ = 94; = 134; }; - - Index: rules/base.lists.part =================================================================== RCS file: /cvs/xlibs/xkbdesc/rules/base.lists.part,v retrieving revision 1.25 diff -u -r1.25 base.lists.part --- rules/base.lists.part 2 Aug 2006 23:16:21 -0000 1.25 +++ rules/base.lists.part 31 Aug 2006 15:25:51 -0000 @@ -9,8 +9,9 @@ ! $pcgeometries = abnt2 latitude microsoft jp106 kr106 -! $maclaptop = ibook powerbook -! $mac = macintosh macintosh_old ibook powerbook +! $macbooks = macbook78 macbook79 +! $maclaptop = ibook powerbook macbook78 macbook79 +! $mac = macintosh macintosh_old ibook powerbook macbook78 macbook79 ! $macvendorlayouts = ch de dk es fi fr gb is it nl no pt se us @@ -41,7 +42,7 @@ microsoftinet microsoftpro microsoftprousb microsoftprooem microsoftprose \ microsoftoffice microsoftmult \ oretec \ - power_g5 propeller silvercrest scorpius \ + propeller silvercrest scorpius \ qtronix \ samsung4500 samsung4510 \ sk1300 sk2500 sk6200 sk7100 sp_inet \ Index: rules/base.m_g.part =================================================================== RCS file: /cvs/xlibs/xkbdesc/rules/base.m_g.part,v retrieving revision 1.5 diff -u -r1.5 base.m_g.part --- rules/base.m_g.part 25 Jun 2006 21:23:53 -0000 1.5 +++ rules/base.m_g.part 31 Aug 2006 15:25:51 -0000 @@ -11,5 +11,7 @@ everex = everex(STEPnote) winbook = winbook(XP5) pc98 = nec(pc98) + macbook78 = apple(laptop78) + macbook79 = apple(laptop79) $mac = macintosh(macintosh) * = pc(pc104) Index: rules/base.m_k.part =================================================================== RCS file: /cvs/xlibs/xkbdesc/rules/base.m_k.part,v retrieving revision 1.6 diff -u -r1.6 base.m_k.part --- rules/base.m_k.part 26 Mar 2006 22:16:07 -0000 1.6 +++ rules/base.m_k.part 31 Aug 2006 15:25:51 -0000 @@ -9,4 +9,6 @@ abnt2 = xfree86(abnt2) jp106 = xfree86(jp106) evdev = evdev + $macbooks = macintosh(macbook) + $mac = macintosh * = xfree86 Index: rules/base.m_s.part =================================================================== RCS file: /cvs/xlibs/xkbdesc/rules/base.m_s.part,v retrieving revision 1.4 diff -u -r1.4 base.m_s.part --- rules/base.m_s.part 11 Jan 2006 22:48:13 -0000 1.4 +++ rules/base.m_s.part 31 Aug 2006 15:25:51 -0000 @@ -1,2 +1,4 @@ - $maclaptop = +macintosh_vndr/apple(laptop_bad_switch) $inetkbds = +inet(%m) + $maclaptop = +inet(apple_laptop) + $mac = +inet(apple) + power_g5 = +inet(apple) Index: rules/base.ml_s.part =================================================================== RCS file: /cvs/xlibs/xkbdesc/rules/base.ml_s.part,v retrieving revision 1.7 diff -u -r1.7 base.ml_s.part --- rules/base.ml_s.part 14 Jan 2006 23:49:27 -0000 1.7 +++ rules/base.ml_s.part 31 Aug 2006 15:25:51 -0000 @@ -13,6 +13,7 @@ old_macintosh $macvendorlayouts = macintosh_vndr/us(extended)+macintosh_vndr/%l%(v) old_macintosh $nonlatin = macintosh_vndr/us(extended)+%l%(v):2 old_macintosh * = macintosh_vndr/us(extended)+%l%(v) + $macbooks * = pc(pc105)+%l%(v) $mac en_US = pc(pc105)+macintosh_vndr/us(extended) $mac $macvendorlayouts = pc(pc105)+macintosh_vndr/%l%(v) $pcmodels intl = us(%mcompose) Index: rules/base.xml.in =================================================================== RCS file: /cvs/xlibs/xkbdesc/rules/base.xml.in,v retrieving revision 1.139 diff -u -r1.139 base.xml.in --- rules/base.xml.in 30 Aug 2006 23:47:26 -0000 1.139 +++ rules/base.xml.in 31 Aug 2006 15:25:51 -0000 @@ -682,6 +682,18 @@ + macbook78 + MacBook/MacBook Pro + + + + + macbook79 + MacBook/MacBook Pro (Intl) + + + + macintosh <_description>Macintosh Index: symbols/inet =================================================================== RCS file: /cvs/xlibs/xkbdesc/symbols/inet,v retrieving revision 1.41 diff -u -r1.41 inet --- symbols/inet 2 Aug 2006 23:16:21 -0000 1.41 +++ symbols/inet 31 Aug 2006 15:25:52 -0000 @@ -2155,22 +2155,25 @@ // don't generate scancodes. It is possible to map them to whatever user wants. }; -// Apple PowerMac G5 -xkb_symbols "power_g5" { +// Apple keyboards (macbooks, powerbooks, powermac G5, etc) +partial xkb_symbols "apple" { +// Really brightness up/down + key { [ XF86BrightnessAdjust ] }; + key { [ XF86BrightnessAdjust ] }; key { [ XF86AudioMute ] }; key { [ XF86AudioLowerVolume ] }; key { [ XF86AudioRaiseVolume ] }; + key { [ XF86RotateWindows ] }; +// Really keyboard backlight off/up/down + key { [ XF86Launch0 ] }; + key { [ XF86Launch1 ] }; + key { [ XF86Launch2 ] }; key { [ F13 ] }; key { [ F14 ] }; key { [ F15 ] }; key { [ XF86Eject ] }; key { [ F16 ] }; -}; - -// Apple keyboard -partial modifier_keys -xkb_symbols "apple" { - key { [ KP_Equal ] }; + key { [ KP_Equal ] }; }; partial modifier_keys