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

Damien damien.ciabrini at gmail.com
Fri Jan 22 15:05:27 PST 2010


Hi Peter, my comments below

On Sat, Dec 26, 2009 at 1:42 AM, Peter Hutterer
<peter.hutterer at who-t.net> wrote:
> On Thu, Dec 24, 2009 at 07:46:45PM +0100, Damien Ciabrini wrote:
>> 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 ] };
>> +};
>
> that seems a bit weird - what overrides the Num_Lock in the basic layout? It
> seems that keypad core should cover this.
>
On those apple keyboards, the key in place of NumLock is engraved with
a symbol which stands for 'Clear',
and keypad are outputing digits (as in types/numpad(mac)). Patch 3/7
implements this by mapping NMLK to XF86Clear
(macintosh_vndr/apple(alukeys)).

I could not find any setting which only replaces the NMLK symbol.
Besides keypad code also redefines Enter and Equals, hence the choice
i made.

Does it sound more acceptable?

>> +
>> +// 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 ]
>> +    };
>
> either the comment is wrong or the symbols file - groups are one-indexed
> when described in english (e.g. F1 is on level one). It seem that the
> multimedia key is on level2, with level3 being empty.
> On that note, level 1, unless overriden, should probably be NoSymbol and the
> F keys are then filled in by the defaults.
>
> that aside, this part seems like it could just be a default.
OK. I'll send another patch with NoSymbol in level one, and merge it
with the symbols definition provided in Patch 3/7.

>
> Cheers,
>  Peter
>

Thanks for your review,
-- 
Damien


More information about the xorg-devel mailing list