[PATCH 6/7] xkeyboard-config: Compatibility options for Apple Aluminium Keyboards

Damien Ciabrini damien.ciabrini at gmail.com
Thu Dec 24 10:46:45 PST 2009


Various XKB Options to make Aluminium Keyboard behave more like a PC keyboard
apple:alupcfkeys   - PC-like Fkeys (Print Screen, Scroll Lock...) instead of F13,F14,F15
apple:alupcnumlock - PC-like Numlock instead of Clear
apple:alul3media   - Multimedia Fkeys generated via 3rd level key
---
 rules/base.o_s.part          |    3 ++
 rules/base.xml.in            |   18 ++++++++++
 symbols/macintosh_vndr/apple |   73 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 94 insertions(+), 0 deletions(-)

diff --git a/rules/base.o_s.part b/rules/base.o_s.part
index 47bfa00..5dcd294 100644
--- a/rules/base.o_s.part
+++ b/rules/base.o_s.part
@@ -106,5 +106,8 @@
   esperanto:qwerty      =	+epo(qwerty)
   esperanto:dvorak      =	+epo(dvorak)
   terminate:ctrl_alt_bksp =	+terminate(ctrl_alt_bksp)
+  apple:alupcfkeys	=	+macintosh_vndr/apple(alupcfkeys)
+  apple:alupcnumlock	=	+macintosh_vndr/apple(alupcnumlock)
+  apple:alul3media	=	+macintosh_vndr/apple(alul3media)
 
 
diff --git a/rules/base.xml.in b/rules/base.xml.in
index 22e5e3a..ba2fcf2 100644
--- a/rules/base.xml.in
+++ b/rules/base.xml.in
@@ -5046,6 +5046,24 @@
       </option>
       <option>
         <configItem>
+          <name>apple:alupcfkeys</name>
+          <description>Apple Aluminium Keyboard: enable Print, Scroll_Lock and Pause keys</description>
+        </configItem>
+      </option>
+      <option>
+        <configItem>
+          <name>apple:alupcnumlock</name>
+          <description>Apple Aluminium Keyboard: replace Clear key with NumLock</description>
+        </configItem>
+      </option>
+      <option>
+        <configItem>
+          <name>apple:alul3media</name>
+          <description>Apple Aluminium Keyboard: multimedia keys accessible at 3d level</description>
+        </configItem>
+      </option>
+      <option>
+        <configItem>
           <name>shift:breaks_caps</name>
           <_description>Shift cancels CapsLock</_description>
         </configItem>
diff --git a/symbols/macintosh_vndr/apple b/symbols/macintosh_vndr/apple
index 2597dbf..b77a0f2 100644
--- a/symbols/macintosh_vndr/apple
+++ b/symbols/macintosh_vndr/apple
@@ -69,3 +69,76 @@ xkb_symbols "alukeys" {
     // CAPS key is always Caps_Lock, even for JIS keyboards
     replace key <CAPS> { [ Caps_Lock ] };
 };
+
+// Aluminium Keyboard: make F13, F14, F15 PC-ish (Print, Scroll_Lock, Pause)
+partial function_keys
+xkb_symbols "alupcfkeys" {
+    key <FK13> {
+      type= "PC_ALT_LEVEL2",
+      symbols[Group1]= [ Print, Sys_Req ]
+    };
+    key <FK14> { [ Scroll_Lock ] };
+    key <FK15> {
+      type= "PC_CONTROL_LEVEL2",
+      symbols[Group1]= [ Pause, Break ]
+    };
+};
+
+partial keypad_keys
+xkb_symbols "alupcnumlock" {
+    override key <NMLK> { [ Num_Lock, Pointer_EnableKeys ] };
+};
+
+// Aluminium Keyboard: multimedia key at third level, instead of via 'Fn' key
+// useful when the Fn key is remapped to something else (e.g. Insert)
+partial
+xkb_symbols "alul3media" {
+    key <FK01> {
+      type= "FOUR_LEVEL_X",
+      symbols[Group1]= [ F1, XF86KbdBrightnessDown, NoSymbol, XF86_Switch_VT_1 ]
+    };
+    key <FK02> {
+      type= "FOUR_LEVEL_X",
+      symbols[Group1]= [ F2, XF86KbdBrightnessUp, NoSymbol, XF86_Switch_VT_2 ]
+    };
+    key <FK03> {
+      type= "FOUR_LEVEL_X",
+      symbols[Group1]= [ F3, NoSymbol, NoSymbol, XF86_Switch_VT_3 ]
+    };
+    key <FK04> {
+      type= "FOUR_LEVEL_X",
+      symbols[Group1]= [ F4, NoSymbol, NoSymbol, XF86_Switch_VT_4 ]
+    };
+    key <FK05> {
+      type= "FOUR_LEVEL_X",
+      symbols[Group1]= [ F5, NoSymbol, NoSymbol, XF86_Switch_VT_5 ]
+    };
+    key <FK06> {
+      type= "FOUR_LEVEL_X",
+      symbols[Group1]= [ F6, NoSymbol, NoSymbol, XF86_Switch_VT_6 ]
+    };
+    key <FK07> {
+      type= "FOUR_LEVEL_X",
+      symbols[Group1]= [ F7, XF86AudioPrev, NoSymbol, XF86_Switch_VT_7 ]
+    };
+    key <FK08> {
+      type= "FOUR_LEVEL_X",
+      symbols[Group1]= [ F8, XF86AudioPlay, NoSymbol, XF86_Switch_VT_8 ]
+    };
+    key <FK09> {
+      type= "FOUR_LEVEL_X",
+      symbols[Group1]= [ F9, XF86AudioNext, NoSymbol, XF86_Switch_VT_9 ]
+    };
+    key <FK10> {
+      type= "FOUR_LEVEL_X",
+      symbols[Group1]= [ F10, XF86AudioMute, NoSymbol, XF86_Switch_VT_10 ]
+    };
+    key <FK11> {
+      type= "FOUR_LEVEL_X",
+      symbols[Group1]= [ F11, XF86AudioLowerVolume, NoSymbol, XF86_Switch_VT_11 ]
+    };
+    key <FK12> {
+      type= "FOUR_LEVEL_X",
+      symbols[Group1]= [ F12, XF86AudioRaiseVolume, NoSymbol, XF86_Switch_VT_12 ]
+    };
+};
-- 
1.6.3.3



More information about the xorg-devel mailing list