[PATCH v2 3/7] xkeyboard-config: Symbols for Apple Aluminium keyboards

Peter Hutterer peter.hutterer at who-t.net
Thu Feb 18 19:20:17 PST 2010


On Sat, Jan 23, 2010 at 12:37:33AM +0100, Damien Ciabrini wrote:
> 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 <damien.ciabrini at gmail.com>
> ---
> This version retrofits comments from Peter Hutterer w.r.t. Patch 6/7
> 
> In addition, i've duplicated contents of macintosh_vndr/jp in jp(mac) and made this variant available in the base.xml config file, as it seems to be done for all other layouts (f.d.o bug #8465).

Sergey, this looks sane enough to me though some extra eyes would be good.
Acked-by: Peter Hutterer <peter.hutterer at who-t.net>

Cheers,
  Peter

>  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 deletions(-)
>  create mode 100644 symbols/macintosh_vndr/jp
> 
> diff --git a/rules/base.xml.in b/rules/base.xml.in
> index 24bfc2d..dff0abd 100644
> --- a/rules/base.xml.in
> +++ b/rules/base.xml.in
> @@ -2868,6 +2868,12 @@
>              <_description>OADG 109A</_description>
>            </configItem>
>  	</variant>
> +        <variant>
> +          <configItem>
> +            <name>mac</name>
> +            <description>Macintosh</description>
> +          </configItem>
> +        </variant>
>        </variantList>
>      </layout>
>      <layout>
> 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 <AC12> { [ Escape               ] };
>      key <AB11> { [ at, grave            ] };
>  };
> +
> +// Copied from macintosh_vndr/jp
> +partial alphanumeric_keys
> +xkb_symbols "mac" {
> +    name[Group1]	= "Japan - Macintosh";
> +    include "jp(kana)"
> +
> +    replace key <CAPS> { [ 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 <FK13> { [ F13 ] };
> +    key <FK14> { [ F14 ] };
> +    key <FK15> { [ F15 ] };
> +    key <FK16> { [ F16 ] };
> +    key <FK17> { [ F17 ] };
> +    key <FK18> { [ F18 ] };
> +    key <FK19> { [ F19 ] };
> +
> +    // On aluminium keyboards, Num_Lock is replace by Clear
> +    replace key <NMLK> { [ XF86Clear ] };
> +    // CAPS key is always Caps_Lock, even for JIS keyboards
> +    replace key <CAPS> { [ 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 <FK01> {
> +      type= "FOUR_LEVEL_X",
> +      symbols[Group1]= [ NoSymbol, XF86KbdBrightnessDown, NoSymbol, XF86_Switch_VT_1 ]
> +    };
> +    key <FK02> {
> +      type= "FOUR_LEVEL_X",
> +      symbols[Group1]= [ NoSymbol, XF86KbdBrightnessUp, NoSymbol, XF86_Switch_VT_2 ]
> +    };
> +    key <FK03> {
> +      type= "FOUR_LEVEL_X",
> +      symbols[Group1]= [ NoSymbol, NoSymbol, NoSymbol, XF86_Switch_VT_3 ]
> +    };
> +    key <FK04> {
> +      type= "FOUR_LEVEL_X",
> +      symbols[Group1]= [ NoSymbol, NoSymbol, NoSymbol, XF86_Switch_VT_4 ]
> +    };
> +    key <FK05> {
> +      type= "FOUR_LEVEL_X",
> +      symbols[Group1]= [ NoSymbol, NoSymbol, NoSymbol, XF86_Switch_VT_5 ]
> +    };
> +    key <FK06> {
> +      type= "FOUR_LEVEL_X",
> +      symbols[Group1]= [ NoSymbol, NoSymbol, NoSymbol, XF86_Switch_VT_6 ]
> +    };
> +    key <FK07> {
> +      type= "FOUR_LEVEL_X",
> +      symbols[Group1]= [ NoSymbol, XF86AudioPrev, NoSymbol, XF86_Switch_VT_7 ]
> +    };
> +    key <FK08> {
> +      type= "FOUR_LEVEL_X",
> +      symbols[Group1]= [ NoSymbol, XF86AudioPlay, NoSymbol, XF86_Switch_VT_8 ]
> +    };
> +    key <FK09> {
> +      type= "FOUR_LEVEL_X",
> +      symbols[Group1]= [ NoSymbol, XF86AudioNext, NoSymbol, XF86_Switch_VT_9 ]
> +    };
> +    key <FK10> {
> +      type= "FOUR_LEVEL_X",
> +      symbols[Group1]= [ NoSymbol, XF86AudioMute, NoSymbol, XF86_Switch_VT_10 ]
> +    };
> +    key <FK11> {
> +      type= "FOUR_LEVEL_X",
> +      symbols[Group1]= [ NoSymbol, XF86AudioLowerVolume, NoSymbol, XF86_Switch_VT_11 ]
> +    };
> +    key <FK12> {
> +      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 <damien.ciabrini at gmail.com>)
> +//
> +// 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 <JPCM> { [ KP_Separator ] };
> +    key <AE13> { [ yen, bar 	] };
> +    replace key <AE10> { [ 0		] };
> +    replace key <AB11> { [ underscore	] };
> +    replace key <CAPS> { [ Caps_Lock ] };
> +};
> +
> +partial alphanumeric_keys
> +xkb_symbols "mac" {
> +    name[Group1]	= "Japan - Macintosh";
> +    include "jp(kana)"
> +
> +    replace key <CAPS> { [ 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 <HJCV> { [ Hiragana_Katakana ] };
> +    replace key <HNGL> { [ Eisu_toggle ] };
> +};
> -- 
> 1.6.5
> 


More information about the xorg-devel mailing list