From f3296f32344340a63f1714df5a9f5f32adec2615 Mon Sep 17 00:00:00 2001 From: Damien Ciabrini Date: Thu, 24 Dec 2009 16:20:37 +0100 Subject: [PATCH] xkeyboard-config: Symbols for Apple Aluminium keyboards Symbols common to ANSI, ISO and JIS keyboards New jp file for JIS keyboard to override usual jp mapping (including EISU and KANA keys) Duplicate jp layout available in symbol/jp, via the "mac" variant Signed-off-by: Damien Ciabrini --- rules/base.xml.in | 6 ++++ symbols/jp | 9 +++++ symbols/macintosh_vndr/Makefile.am | 2 +- symbols/macintosh_vndr/apple | 73 ++++++++++++++++++++++++++++++++++++++ symbols/macintosh_vndr/jp | 35 ++++++++++++++++++ 5 files changed, 124 insertions(+), 1 deletion(-) create mode 100644 symbols/macintosh_vndr/jp diff --git a/rules/base.xml.in b/rules/base.xml.in index e472d72..8dde521 100644 --- a/rules/base.xml.in +++ b/rules/base.xml.in @@ -2888,6 +2888,12 @@ <_description>OADG 109A + + + mac + Macintosh + + diff --git a/symbols/jp b/symbols/jp index 694090c..68ffff7 100644 --- a/symbols/jp +++ b/symbols/jp @@ -211,3 +211,12 @@ xkb_symbols "nicola_f_bs" { key { [ Escape ] }; key { [ at, grave ] }; }; + +// Copied from macintosh_vndr/jp +partial alphanumeric_keys +xkb_symbols "mac" { + name[Group1] = "Japan - Macintosh"; + include "jp(kana)" + + replace key { [ Caps_Lock ] }; +}; diff --git a/symbols/macintosh_vndr/Makefile.am b/symbols/macintosh_vndr/Makefile.am index 8a4ca9f..f39662e 100644 --- a/symbols/macintosh_vndr/Makefile.am +++ b/symbols/macintosh_vndr/Makefile.am @@ -3,6 +3,6 @@ symbolsdir = $(xkb_base)/symbols/macintosh_vndr dist_symbols_DATA = \ apple ch de dk \ fi fr \ -gb is it \ +gb is it jp \ latam nl no pt \ se us diff --git a/symbols/macintosh_vndr/apple b/symbols/macintosh_vndr/apple index 3887caf..e6ab89f 100644 --- a/symbols/macintosh_vndr/apple +++ b/symbols/macintosh_vndr/apple @@ -52,3 +52,76 @@ xkb_symbols "laptop_bad_switch" { // Kept for backward compatibility include "macintosh_vndr/apple(laptop)" }; + +// Long Aluminium Keyboards +partial function_keys +xkb_symbols "alukbd" { + // The base is a inet PC keyboard + include "pc" + + // Additional Fxx keys + key { [ F13 ] }; + key { [ F14 ] }; + key { [ F15 ] }; + key { [ F16 ] }; + key { [ F17 ] }; + key { [ F18 ] }; + key { [ F19 ] }; + + // On aluminium keyboards, Num_Lock is replace by Clear + replace key { [ XF86Clear ] }; + // CAPS key is always Caps_Lock, even for JIS keyboards + replace key { [ Caps_Lock ] }; + + // F1..F12 are multimedia keys when used with the 'Fn' key + // Make those multimedia actions available via ISO_Level3_Shift too, + // it is useful when the Fn key is remapped to something else (e.g. Insert) + key { + type= "FOUR_LEVEL_X", + symbols[Group1]= [ NoSymbol, XF86KbdBrightnessDown, NoSymbol, XF86_Switch_VT_1 ] + }; + key { + type= "FOUR_LEVEL_X", + symbols[Group1]= [ NoSymbol, XF86KbdBrightnessUp, NoSymbol, XF86_Switch_VT_2 ] + }; + key { + type= "FOUR_LEVEL_X", + symbols[Group1]= [ NoSymbol, NoSymbol, NoSymbol, XF86_Switch_VT_3 ] + }; + key { + type= "FOUR_LEVEL_X", + symbols[Group1]= [ NoSymbol, NoSymbol, NoSymbol, XF86_Switch_VT_4 ] + }; + key { + type= "FOUR_LEVEL_X", + symbols[Group1]= [ NoSymbol, NoSymbol, NoSymbol, XF86_Switch_VT_5 ] + }; + key { + type= "FOUR_LEVEL_X", + symbols[Group1]= [ NoSymbol, NoSymbol, NoSymbol, XF86_Switch_VT_6 ] + }; + key { + type= "FOUR_LEVEL_X", + symbols[Group1]= [ NoSymbol, XF86AudioPrev, NoSymbol, XF86_Switch_VT_7 ] + }; + key { + type= "FOUR_LEVEL_X", + symbols[Group1]= [ NoSymbol, XF86AudioPlay, NoSymbol, XF86_Switch_VT_8 ] + }; + key { + type= "FOUR_LEVEL_X", + symbols[Group1]= [ NoSymbol, XF86AudioNext, NoSymbol, XF86_Switch_VT_9 ] + }; + key { + type= "FOUR_LEVEL_X", + symbols[Group1]= [ NoSymbol, XF86AudioMute, NoSymbol, XF86_Switch_VT_10 ] + }; + key { + type= "FOUR_LEVEL_X", + symbols[Group1]= [ NoSymbol, XF86AudioLowerVolume, NoSymbol, XF86_Switch_VT_11 ] + }; + key { + type= "FOUR_LEVEL_X", + symbols[Group1]= [ NoSymbol, XF86AudioRaiseVolume, NoSymbol, XF86_Switch_VT_12 ] + }; +}; diff --git a/symbols/macintosh_vndr/jp b/symbols/macintosh_vndr/jp new file mode 100644 index 0000000..331257a --- /dev/null +++ b/symbols/macintosh_vndr/jp @@ -0,0 +1,35 @@ +// JIS symbol mapping for Apple Aluminium Keyboard +// (Damien Ciabrini ) +// +// The JIS version of the Aluminium Keyboard is made of +// QWERTY-like map for the latin part +// PC98-like map for the kana part +// EISU and KANA keys found on other Apple keyboards + +partial default alphanumeric_keys +xkb_symbols "usmac" { + name[Group1] = "Japan - Macintosh, US map"; + include "jp(common)" + + key { [ KP_Separator ] }; + key { [ yen, bar ] }; + replace key { [ 0 ] }; + replace key { [ underscore ] }; + replace key { [ Caps_Lock ] }; +}; + +partial alphanumeric_keys +xkb_symbols "mac" { + name[Group1] = "Japan - Macintosh"; + include "jp(kana)" + + replace key { [ Caps_Lock ] }; +}; + +partial alphanumeric_keys +xkb_symbols "alujiskeys" { + // On JIS USB keyboard, EISU and KANA replace Hangul and Hanja + // see keycodes macintosh(jisevdev) + replace key { [ Hiragana_Katakana ] }; + replace key { [ Eisu_toggle ] }; +}; -- 2.7.4