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

Re: French Keymap



On Wed, Jan 29, 2003 at 04:29:48PM +0100, Benjamin Herrenschmidt wrote:
> On Wed, 2003-01-29 at 15:46, Michael Herrmann wrote:
> >  Hi!
> > 
> > On my Powerbook G4 1000 I have the same problem, but just with a german keyboard.
> > 
> > I'm comeing from the x86 world and I think the keymaps for PPC Linux are very confuse. 
> > Why there are no such very importent keys like { }or ~?? Yesterday I find a directory 
> > with a apple keymap for german users. Fine, I thought and load the keymap. But I still 
> > miss the { } keys.
> > 
> > Can somebody explain me why in the standart installation this keys are not activated?
> > 
> > Maybe somebody with a german keyboard too can give me any advise to fix my problem.
> > 
> > Thanks for your help!
> 
> For my .fr keyboard, I had to hack keymaps as well. It seems part of the
> problem is that XFree kbd handling isn't designed to have Alt beeing
> used for such key combos. What I did was to turn left alt into
> Mode_switch, but it seems that now, some apps don't recognize it as Alt
> any more for other stuffs.

I don't have this problem, or I did not notice, but you have to map your
Mode_Switch as Mod3. For my Spanish keyboard, I have taken the normal
/etc/X11/xkb_/symbols/es, copied it to /etc/X11/xkb/symbols/macintosh/es
and hacked it to look as similar as possible to MacOS X mappings, at
least for the keys for which I care, and taking into account the fact
that I have to type French, English and Spanish.

For my Pismo, I use both Alt keys as Mode_Switch (same as Mac OS), but
more recent Apple Notebooks have two command (Apple) keys and only one
Alt key from what I've seen. A Bad Thing (TM) IMO. 

<rant>
Don't get me started on why Apple puts a useless enter key to the right 
of the spacebar, nor on why somebody decided that it was clever fo map 
Fn+Cmd to the same emulated scancode as the power button.

There are also some problems of surjective key mappings under X, like
the keypad's = which maps to the Left arrow. It's due to the fact that 
the scancode collide in the builtin X translation tables. I believe
that there is another obscure case of collision but I can't remember
which right now. This could be solved by using medium raw I believe
(there is an option for this).

Another problem in my eyes is that raw does not mean anything anymore
for ADB keyboard. I'm a hardware guy and I like to be close to the
hardware. The fact that you can no more access the raw keycodes of
your keyboard certainly annoys me, especially when the mappings are
surjective and cannot be changed (please tell me if they can be changed).
</rant>

Ok, enough rant. Here is my symbols/macintosh/es file, still
inconsistent with what I have on the console (ISO-8859-15 with
Euro, french oe ligatures, etc):


partial default alphanumeric_keys modifier_keys 
xkb_symbols "basic" {

    // Describes the differences between a very simple en_US
    // keyboard and a very simple Spanish keybaord

    name[Group1]= "Spanish";

    key <TLDE> {	[       masculine,     ordfeminine      ],	
    			[	backslash,          degree	]	};
    key <LSGT> {	[	     less,	   greater	],
			[	      bar,       brokenbar	]	};
    key <AE01> {	[         	1,	    exclam	],
			[	      bar,	exclamdown	]	};
    key <AE02> {	[               2,        quotedbl     	],	
			[	       at,	 oneeighth	]	};
    key <AE03> {	[               3,  periodcentered     	],	
			[      numbersign,        sterling	]	};
    key <AE04> {	[               4,          dollar     	],	
			[      asciitilde,          dollar	]	};
    key <AE06> {	[               6,       ampersand     	],	
			[	  notsign,     fiveeighths	]	};
    key <AE07> {	[               7,           slash     	]	};
    key <AE08> {	[               8,       parenleft     	]	};
    key <AB08> {	[           comma,       semicolon     	]	};
    key <AE10> {	[               0,           equal     	]	};
    key <AE09> {	[               9,      parenright     	]	};
    key <AB09> {	[          period,           colon     	]	};
    key <AB10> {	[           minus,      underscore     	]	};
    key	<AC10> {	[	   ntilde,          Ntilde  	],	
			[      asciitilde,dead_doubleacute	]	};
    key <AE11> {	[      apostrophe,        question      ]	};
    key <AC11> {	[      dead_acute,  dead_diaeresis 	],	
			[	braceleft,       braceleft	]	};
    key <BKSL> {	[	 ccedilla,        Ccedilla	],
			[      braceright,      dead_breve	]	};
    key <AD11> {	[      dead_grave, dead_circumflex 	],	
			[     bracketleft,  dead_abovering	]	};
    key <AE12> {	[      exclamdown,    questiondown	],
			[      asciitilde,      asciitilde	]	};
    key <AD12> {	[            plus,        asterisk	],
			[    bracketright,     dead_macron	]	};
    key <AD03> {        [               e,               E      ],
                        [        EuroSign,            cent      ]	};

    // End alphanumeric section

    key <LALT> {        [     Mode_switch]       }; 
    key <RALT> {        [     Mode_switch]       };
    key <LWIN> {        [     Alt_L]             };
    key <RWIN> {        [     Alt_R]             };
    // Begin modifier mappings
    modifier_map Mod3   { Mode_switch };
};

partial alphanumeric_keys 
xkb_symbols "Sundeadkeys" {
    include "es(basic)"

    key <AC11> {	[     SunFA_Acute, SunFA_Diaeresis 	],	
			[	braceleft,       braceleft	]	};
    key <AD11> {	[     SunFA_Grave,    SunFA_Circum     	],	
			[     bracketleft,  dead_abovering	]	};
};

partial alphanumeric_keys 
xkb_symbols "sundeadkeys" {
    include "es(Sundeadkeys)"
};

partial alphanumeric_keys 
xkb_symbols "nodeadkeys" {
    include "es(basic)"

    key	<AC10> {	[	   ntilde,          Ntilde  	],	
			[      asciitilde,     doubleacute	]	};
    key <AC11> {	[           acute,       diaeresis 	],	
			[	braceleft,       braceleft	]	};
    key <BKSL> {	[	 ccedilla,        Ccedilla	],
			[      braceright,           breve	]	};
    key <AD11> {	[	    grave,     asciicircum     	],	
			[     bracketleft,          degree	]	};
    key <AD12> {	[            plus,        asterisk	],
			[    bracketright,          macron	]	};
};



Reply to: