[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Re xkb-data with support for Mac keyboards into unstable



Le Thu, Sep 28, 2006 at 10:17:29PM +0200, Denis Barbier a écrit :
> Both have been splitted into 2 variants in X.Org.  Try:
>   $ setxkbmap -model macintosh -layout jp -option -print
>   xkb_keymap {
>         xkb_keycodes  { include "macintosh+aliases(qwerty)"     };
>         xkb_types     { include "complete+numpad(mac)"  };
>         xkb_compat    { include "complete+japan"        };
>         xkb_symbols   { include "pc(pc105)+jp(latin)+jp:2+inet(apple)" };
>         xkb_geometry  { include "macintosh(macintosh)"  };
>   };
> When jp layout is selected, 2 variants are in fact selected: first one
> is jp(latin), second one is jp, which defaults to jp(jp106).
> As you can imagine, jp(latin) is a slightly modified "us" version.
> 
> It is likely that Japanese people do not use the second group, but
> instead an input method engine.  With this setup, I believe that
> "eigo" and "kana" keys can be used to switch between those groups.

Actually, I just realised that windows keyboards use three different
keys with similar functions but different keycodes. As what is written
in japanese on the mac keys is really transliterated as EIGO and KANA, I
propose to add the two following lines to
/usr/share/X11/xkb/keycodes/xfree86

   <EIGO> = 210;
   <KANA> = 209;

They do not seem to conflict with anything else. Then, there are extra
keys at the end of the rows E, D, and C. One (C) is listed in a jp106
specific section, wich is not taken into accound when I setxkbmap
-layout "jp,ca" -variant "latin,multi". The two others of them (B,E) are
correctly defined in the section starting with the following comment:

    // Keys that are generated on Japanese keyboards
    
For the sake of comprehensiveness, I will list them all anyway:

   <AB11> =   211;
   <AC12> =    51; 
   <AE13> =   133;

Maybe less important, there are four multimedia keys:

   <VOL-> = 174;
   <VOL+> = 176;
   <MUTE> = 160;
   <EJECT>= 204;

I copied the name of the first three from the Solaris compatibility
section of the main definition, and invented <EJECT>.

Last but not least, the keypad. It has a "Clear" button which has the
same keycode as NumLock. On some macintosh apps, it clears the current
cell in spreadsheets. I like it a lot! Next to it is a KPEQ with a non
standard keycode. Between the zero and the dot, there is a comma, which
is useful for typing english-style numbers, or when the localisation is
broken. It also has a non-standard keycode, and I named it KPCO.

   <KPEQ> = 157;
   <KPCO> = 134;

I am a bit sorry that my understanding of the configuration files is too
superficial. I tried to modify the keycodes file by myself, and as a
result, could not load any keymab anymore. Therefore, I can not propose
a nice patch. I hope that the infos I listed are helpful enough.

Now that we have the keycodes, we need a jp keyboard in the
macintosh_vendr section. I also was unable to produce one. However, it
should be very similar to jp106, with the following differences:

- The use of the apple-specific keys, such as the multimedia, the KPCO
  and KPEQ, and EIGO / KANA. I do not know what to recommend with EIGO /
  KANA. Japanese users will expect them to swich the inupt system
  between latin and transliteration from latin to japanese (i.e. not the
  default jp106 wich directly outputs in japanese). This requires a UIM
  system; on Mac OS there is only one, but there are many in linux. But
  at least those keys should be available to the UIM systems.

- key <AE13> { [ backslash, bar       ] }; is Yen symbol / bar instead.

I am wondering if it should not be like this on PC as well.

I have screenshots of the MacOSX keyboard viewer with many combinations
of alt/shift/crtl... so we can go in the details later if we have time.
If you or somebody else could provide me some files to test, I would be
happy to do so.

Have a nice day,

-- 
Charles Plessy
http://charles.plessy.org
Wako, Saitama, Japan



Reply to: