diff -urN xkb.orig/geometry/macbook xkb/geometry/macbook --- xkeyboard-config-0.8/geometry/macbook 1970-01-01 01:00:00.000000000 +0100 +++ xkeyboard-config-0.8/geometry/macbook.macbook 2006-08-29 16:02:05.000000000 +0200 @@ -0,0 +1,237 @@ +xkb_geometry "macbook79" { + + description= "MacBook/MacBook Pro (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 + +default xkb_geometry "macbook78" { + + description= "MacBook/MacBook Pro (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 = ; + +}; --- xkeyboard-config-0.8/geometry/Makefile.am.macbook 2006-08-29 19:31:46.000000000 +0200 +++ xkeyboard-config-0.8/geometry/Makefile.am 2006-08-29 19:31:57.000000000 +0200 @@ -6,7 +6,7 @@ amiga ataritt chicony \ dell everex fujitsu \ hp keytronic kinesis \ -macintosh microsoft nec \ +macbook macintosh microsoft nec \ northgate pc sony \ sun winbook README --- xkeyboard-config-0.8/symbols/altwin.macbook 2005-10-01 14:20:31.000000000 +0200 +++ xkeyboard-config-0.8/symbols/altwin 2006-08-29 19:30:42.000000000 +0200 @@ -58,3 +58,14 @@ modifier_map Mod1 { Alt_L, Alt_R, Meta_L, Meta_R }; modifier_map Mod4 { Super_L, Super_R }; }; + +// Make windows key emit alt, alt becomes meta. +// Useful on apple keyboards where the apple key is beside space +partial modifier_keys +xkb_symbols "alt_win" { + key { [ Alt_L ] }; + key { [ Alt_R ] }; + key { [ Meta_L ] }; + modifier_map Mod1 { Alt_L, Alt_R }; + modifier_map Mod4 { Meta_L, Meta_R }; +}; --- xkeyboard-config-0.8/symbols/macintosh_vndr/apple.macbook 2005-09-21 23:29:25.000000000 +0200 +++ xkeyboard-config-0.8/symbols/macintosh_vndr/apple 2006-08-29 19:30:42.000000000 +0200 @@ -3,6 +3,12 @@ // // $XFree86: xc/programs/xkbcomp/symbols/apple,v 1.2 2003/10/24 20:38:20 tsi Exp $ +// MacBook/MacBook Pro +xkb_symbols "macbook" { + key { [ XF86Eject ] }; +}; + + partial default modifier_keys xkb_symbols "extended" { --- xkeyboard-config-0.8/keycodes/xfree86.macbook 2005-09-21 23:29:24.000000000 +0200 +++ xkeyboard-config-0.8/keycodes/xfree86 2006-08-29 19:30:42.000000000 +0200 @@ -412,4 +412,13 @@ = 134; }; +xkb_keycodes "macbook" { + include "xfree86(basic)" + = 51; +// Macbook keyboards switch TLDE and LSGT keycodes + = 94; + = 49; +// Use the right apple key as right alt to get mode shift 3 + = 116; +}; --- xkeyboard-config-0.8/rules/base.ml_s.part.macbook 2006-01-15 00:47:48.000000000 +0100 +++ xkeyboard-config-0.8/rules/base.ml_s.part 2006-08-29 19:30:42.000000000 +0200 @@ -13,6 +13,8 @@ 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) + macbook78 * = pc(pc104)+%l%(v)+macintosh_vndr/apple(macbook) + macbook79 * = pc(pc105)+%l%(v)+macintosh_vndr/apple(macbook) $mac en_US = pc(pc105)+macintosh_vndr/us(extended) $mac $macvendorlayouts = pc(pc105)+macintosh_vndr/%l%(v) $pcmodels intl = us(%mcompose) --- xkeyboard-config-0.8/rules/base.m_g.part.macbook 2005-09-21 23:29:25.000000000 +0200 +++ xkeyboard-config-0.8/rules/base.m_g.part 2006-08-29 19:30:42.000000000 +0200 @@ -13,5 +13,6 @@ winbook = winbook(XP5) pc98 = nec(pc98) abnt2 = pc(abnt2) + $macbooks = macbook(%m) $mac = macintosh(macintosh) * = pc(pc104) --- xkeyboard-config-0.8/rules/base.o_s.part.macbook 2005-09-23 00:21:08.000000000 +0200 +++ xkeyboard-config-0.8/rules/base.o_s.part 2006-08-29 19:30:42.000000000 +0200 @@ -43,6 +43,7 @@ altwin:super_win = +altwin(super_win) altwin:hyper_win = +altwin(hyper_win) altwin:alt_super_win = +altwin(alt_super_win) + altwin:alt_win = +altwin(alt_win) compose:ralt = +compose(ralt) compose:rwin = +compose(rwin) compose:menu = +compose(menu) --- xkeyboard-config-0.8/rules/base.m_k.part.macbook 2006-02-22 00:52:07.000000000 +0100 +++ xkeyboard-config-0.8/rules/base.m_k.part 2006-08-29 19:30:42.000000000 +0200 @@ -8,4 +8,5 @@ abnt2 = xfree86(abnt2) jp106 = xfree86(jp106) evdev = evdev + $macbooks = xfree86(macbook) * = xfree86 --- xkeyboard-config-0.8/rules/base.lists.part.macbook 2006-01-14 23:22:13.000000000 +0100 +++ xkeyboard-config-0.8/rules/base.lists.part 2006-08-29 19:30:42.000000000 +0200 @@ -6,6 +6,7 @@ // ru scc sy syr tel th tj tam ua uz ! $pcmodels = pc101 pc102 pc104 pc105 +! $macbooks = macbook78 macbook79 ! $maclaptop = ibook powerbook ! $mac = macintosh macintosh_old ibook powerbook diff -urN xkb.orig/rules/base xkb/rules/base --- xkeyboard-config-0.8/rules/base.macbook 2006-08-29 17:54:26.000000000 +0200 +++ xkeyboard-config-0.8/rules/base 2006-08-29 17:46:53.000000000 +0200 @@ -15,6 +15,7 @@ // ru scc sy syr tel th tj tam ua uz ! $pcmodels = pc101 pc102 pc104 pc105 +! $macbooks = macbook78 macbook79 ! $maclaptop = ibook powerbook ! $mac = macintosh macintosh_old ibook powerbook @@ -86,6 +87,7 @@ abnt2 = xfree86(abnt2) jp106 = xfree86(jp106) evdev = evdev + $macbooks = xfree86(macbook) * = xfree86 ! layout[1] = keycodes @@ -116,6 +118,7 @@ winbook = winbook(XP5) pc98 = nec(pc98) abnt2 = pc(abnt2) + $macbooks = macbook(%m) $mac = macintosh(macintosh) kinesis = kinesis(model100) * = pc(pc104) @@ -352,6 +355,8 @@ 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) + macbook78 * = pc(pc104)+%l%(v)+macintosh_vndr/apple(macbook) + macbook79 * = pc(pc105)+%l%(v)+macintosh_vndr/apple(macbook) $mac en_US = pc(pc105)+macintosh_vndr/us(extended) $mac $macvendorlayouts = pc(pc105)+macintosh_vndr/%l%(v) $pcmodels intl = us(%mcompose) @@ -997,6 +1002,7 @@ altwin:super_win = +altwin(super_win) altwin:hyper_win = +altwin(hyper_win) altwin:alt_super_win = +altwin(alt_super_win) + altwin:alt_win = +altwin(alt_win) compose:ralt = +compose(ralt) compose:rwin = +compose(rwin) compose:menu = +compose(menu) --- xkeyboard-config-0.8/rules/base.xml.in.macbook 2006-08-29 19:30:42.000000000 +0200 +++ xkeyboard-config-0.8/rules/base.xml.in 2006-08-29 19:30:42.000000000 +0200 @@ -676,6 +676,18 @@ + macbook78 + MacBook/MacBook Pro (US) + + + + + macbook79 + MacBook/MacBook Pro (Intl) + + + + macintosh <_description>Macintosh @@ -2840,6 +2852,12 @@ <_description>Alt is mapped to the right Win-key and Super to Menu. +