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

Re: French keyboard on X



Hi Jean-Phillipe,

french keyboards are a bit of a hack with Linux PPC, but fortunately some resources exist on the web (See for instance [1-3]).

Basically you need to correctly configure the files /usr/X11R6/lib/X11/xkb/keycodes/macintosh /usr/X11R6/lib/X11/xkb/symbols/macintosh/fr so that the 2 stage mapping between the keycodes produced by your keyboard, and the symbols actually received by your X application works. (more technical explanations in [2])

From your problem description I guess that your modifier keys (Meta, Apple, ...) are not correctly configured in the symbol file 'fr'. (That correspond to the 'modifier_map' lines in that file.)

I had to struglle a bit myself to get it works (I'm using kernel 2.4.16 and XFree 4.1.0.1). The config files I found on the net did not perfectly work on my keyboard, but it finally did with some minor modifications.

I send you my own personal versions of the keycodes (file "macintosh") and the symbol files (file "fr"). Maybe they'll directly solve your problem.

I case they don't, I'll be happy to help you any further. (In particular, the 'xev' utility was very useful to me to track what was going on in the mapping process.)

Bon courage !

Francois

[1] http://www.mire.net/cl/LinuxPPC-FR.html
[2] http://webperso.easynet.fr/~eherlent/tc/cfl-lisez-moi.txt
[3] http://webperso.easynet.fr/~eherlent/linuxmac_clavier.html

Jean-Philippe FASSINO wrote:

Hello,

I have problem on debian sid, debian kernel 2.4.16 and X 4.1.
I cannot hit composed char like pipe and  braket, etc.
But all work well on console.
Does anyone solve this problem ??

Thanks

JP

// $Xorg: fr,v 1.3 2000/08/17 19:54:42 cpqbld Exp $




// $XFree86: xc/programs/xkbcomp/symbols/fr,v 3.5 2000/10/27 18:31:09 dawes Exp $

partial default alphanumeric_keys 
xkb_symbols "basic" {

    // Describes the differences between a very simple US/ASCII
    // keyboard and a very simple French keybaord

    name[Group1]= "French";
    key <LALT> {        [            Mod3			]       };
    key <TLDE> {	[     twosuperior 			]	};
    key <AE01> {	[       ampersand,               1	],
			[     onesuperior,      exclamdown	]	};
    key <AE02> {	[          eacute,               2	],
			[      asciitilde,       oneeighth	]	};
    key <AE03> { 	[        quotedbl,               3	], 
			[      numbersign,        sterling	]	};
    key <AE04> {	[      apostrophe,               4	],
			[       braceleft,          dollar	]	};
    key <AE05> {	[       parenleft,               5	],
			[     bracketleft,    threeeighths	]	};
    key <AE06> {	[           minus,               6	],
			[             bar,     fiveeighths	]	};
    key <AE07> { 	[          egrave,               7	],
			[           grave,    seveneighths	]	};
    key <AE08> {	[      underscore,               8	],
			[       backslash,       trademark	]	};
    key <AE09> {	[        ccedilla,               9	],
			[     asciicircum,       plusminus	]	};
    key <AE10> {	[          agrave,               0	],
			[              at,          degree	]	};
    key <AE11> {	[      parenright,          degree	],
			[    bracketright,    questiondown	]	};
    key <AE12> {	[           equal,            plus	],
			[      braceright,     dead_ogonek	]	};
    key <AD01> {	[               a,               A	],
			[              ae,              AE	]	};
    key <AD02> {	[               z,               Z	],
			[   guillemotleft,            less	]	};
    key <AD03> {        [               e,               E      ],
                        [        EuroSign,            cent      ]	};
    key <AD11> {	[ dead_circumflex,  dead_diaeresis	]	};
    key <AD12> {	[          dollar,        sterling	],
			[        currency,     dead_macron	]	};
    key <AC01> {	[               q,               Q	],
			[              at,     Greek_OMEGA	]	};
    key <AC10> {	[               m,               M	],
			[              mu,       masculine	]	};
    key <AC11> {	[          ugrave,         percent	]	};
    key <LSGT> {	[            less,         greater	]	};
    key <AB01> {	[               w,               W	],
			[         lstroke,         Lstroke	]	};
    key <AB07> {	[           comma,        question	],
			[      dead_acute, dead_doubleacute	]	};
    key <AB08> {	[       semicolon,          period	]	};
    key <AB09> {	[           colon,           slash	]	};
    key <AB10> {	[          exclam,         section	]	};
    key <BKSL> {	[        asterisk,              mu	]	};
    // End alphanumeric section

    // begin modifier mappings
    modifier_map Shift  { Shift_L };
    modifier_map Lock   { Caps_Lock };
    modifier_map Control{ Control_L };
    modifier_map Mod3	{ Mode_switch };
//    modifier_map Mod3	{ Alt_R, Alt_L };
};

partial alphanumeric_keys 
xkb_symbols "Sundeadkeys" {

    // Modifies the basic French layout to use the Sun dead keys

    include "fr(basic)"
    key <AD11> {	[    SunFA_Circum, SunFA_Diaeresis	]	};
    key <AB07> {	[           comma,        question	],
			[     SunFA_Acute,dead_doubleacute	]	};
};

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

partial alphanumeric_keys 
xkb_symbols "nodeadkeys" {

    // Modifies the basic French layout to eliminate all dead keys

    include "fr(basic)"
    key <AE12> {	[           equal,            plus	],
			[      braceright,          ogonek	]	};
    key <AD11> {	[     asciicircum,       diaeresis	]	};
    key <AD12> {	[          dollar,        sterling	],
			[        currency,          macron	]	};
    key <AB07> {	[           comma,        question	],
			[           acute,     doubleacute	]	};
};
// $XConsortium: macintosh /main/10 1996/01/24 12:17:35 kaleb $
//
//Copyright (c) 1996  X Consortium
//
//Permission is hereby granted, free of charge, to any person obtaining
//a copy of this software and associated documentation files (the
//"Software"), to deal in the Software without restriction, including
//without limitation the rights to use, copy, modify, merge, publish,
//distribute, sublicense, and/or sell copies of the Software, and to
//permit persons to whom the Software is furnished to do so, subject to
//the following conditions:
//
//The above copyright notice and this permission notice shall be
//included in all copies or substantial portions of the Software.
//
//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
//EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
//MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
//IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
//OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
//ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
//OTHER DEALINGS IN THE SOFTWARE.
//
//Except as contained in this notice, the name of the X Consortium shall
//not be used in advertising or otherwise to promote the sale, use or
//other dealings in this Software without prior written authorization
//from the X Consortium.
//
// $XFree86: xc/programs/xkbcomp/keycodes/macintosh,v 1.1 1999/05/23 05:27:51 dawes Exp $
//
default xkb_keycodes "macintosh" {

    minimum= 8;
    maximum= 134;

    <ESC>  = 61;
    <TLDE> = 58;
    <AE01> = 26;
    <AE02> = 27;
    <AE03> = 28;
    <AE04> = 29;
    <AE05> = 31;
    <AE06> = 30;
    <AE07> = 34;
    <AE08> = 36;
    <AE09> = 33;
    <AE10> = 37;
    <AE11> = 35;
    <AE12> = 32;
    <BKSP> = 59;

    <TAB>  = 56;
    <AD01> = 20;
    <AD02> = 21;
    <AD03> = 22;
    <AD04> = 23;
    <AD05> = 25;
    <AD06> = 24;
    <AD07> = 40;
    <AD08> = 42;
    <AD09> = 39;
    <AD10> = 43;
    <AD11> = 41;
    <AD12> = 38;
    <BKSL> = 50;

    <CAPS> = 65;
    <AC01> = 8;
    <AC02> = 9;
    <AC03> = 10;
    <AC04> = 11;
    <AC05> = 13;
    <AC06> = 12;
    <AC07> = 46;
    <AC08> = 48;
    <AC09> = 45;
    <AC10> = 49;
    <AC11> = 47;
    <RTRN> = 44;

    <LSGT> = 18;
    <AB01> = 14;
    <AB02> = 15;
    <AB03> = 16;
    <AB04> = 17;
    <AB05> = 19;
    <AB06> = 53;
    <AB07> = 54;
    <AB08> = 51;
    <AB09> = 55;
    <AB10> = 52;

    <SPCE> = 57;

    <LCTL> = 62;  // Left Control
    <LALT> = 63;  // Left Option
    <LFSH> = 64;  // Left Shift
    <RALT> = 66;  // Left Command
//    <RTSH> = 131; // Right Shift
//    <RALT> = 132; // Right Command
//    <RCTL> = 133; // Right Control
//    <RMTA> = 134; // Right Option

    <FK01> = 130;
    <FK02> = 128;
    <FK03> = 107;
    <FK04> = 126;
    <FK05> = 104;
    <FK06> = 105;
    <FK07> = 106;
    <FK08> = 108;
    <FK09> = 109;
    <FK10> = 117;
    <FK11> = 111;
    <FK12> = 119;

    <PRSC> = 113;
    <SCLK> = 115;
    <PAUS> = 121;

    <INS>  = 122;
    <HOME> = 123;
    <PGUP> = 124;
    <DELE> = 125;
    <END>  = 127;
    <PGDN> = 129;

    <UP>   = 70;
    <LEFT> = 67;
    <DOWN> = 69;
    <RGHT> = 68;

    <NMLK> = 79;
    <KPEQ> = 89;
    <KPDV> = 83;
    <KPMU> = 75;

    <KP7>  = 97;
    <KP8>  = 99;
    <KP9>  = 100;
    <KPSU> = 86;

    <KP4>  = 94;
    <KP5>  = 95;
    <KP6>  = 96;
    <KPAD> = 77;

    <KP1>  = 91;
    <KP2>  = 92;
    <KP3>  = 93;
    <KPEN> = 84;

    <KP0>  = 90;
    <KPDL> = 73;

    indicator 3 = "Scroll Lock";
    indicator 2 = "Num Lock";
    indicator 1 = "Caps Lock";

    alias <ALGR> = <RALT>;
};

Reply to: