Hi,

This is a patch to include the fr-latin9 layout in XFree86. This layout
has been in wide use on Linux since the early 90's, is very mature and
included in Linux console tools like kbd
(http://ftp.fr.kernel.org/pub/linux/utils/kbd/). It is the  layout
recommended by official documents like the Linux French localization
HOWTO : http://www.tldp.org/HOWTO/Francophones-HOWTO.html

This is not a mod of the "fr" XFree86 layout. The "fr" layout is a very
thin overlay of the common latin core (even retaining some qwertyisms)
whereas this layout was written and then modified to address the
everyday needs of French speakers. While both the "fr" and the
"fr-latin9" layouts strictly adhere to the symbols commonly printed on
consumer keyboards (except for the square and currency symbols in
fr-latin9 that have been replaced by something actually useful)
fr-latin9 third and fourth layer symbols are totally different and focus
on French accented letters access (and other symbols people use in real
life).

Both me and the current maintainer (Guylhem Aznar) are available to
explain and discuss this layout design decisions if such a thing as a
"fr" XFree86 maintainer can be found (and with everybody else who is
interested).

This is my first XFree86 patch ; as such I expect to have made some
mistakes so feel free to correct me/tell me what must be changed if
necessary. I tested the layout on a fairly recent cvs snapshot, but
didn't test a full XFree86 building (I hope its as obviously correct as
I think it is).

The patch follows inline ; you can also pull it from :
http://mapage.noos.fr/nmailhot/fr-latin9.patch



diff -uNr xc.orig/programs/xkbcomp/keymap/xfree86
xc/programs/xkbcomp/keymap/xfree86
-- xc.orig/programs/xkbcomp/keymap/xfree86 2002-12-17 22:25:01.000000000
+0100
+++ xc/programs/xkbcomp/keymap/xfree86 2002-12-17 22:39:47.000000000
+0100
@@ -105,6 +105,13 @@
     xkb_symbols { include "en_US(pc105)+fr" };
     xkb_geometry { include "pc(pc102)" };
};
+xkb_keymap "fr-latin9" {
+    xkb_keycodes        { include "xfree86"             };
+    xkb_types           { include "default"             };
+    xkb_compatibility   { include "default"             };
+    xkb_symbols         { include "en_US(pc105)+fr-latin9" };
+    xkb_geometry        { include "pc"           };
+};
xkb_keymap "fr_CA" {
     xkb_keycodes { include "xfree86" };
     xkb_types { include "default" };
diff -uNr xc.orig/programs/xkbcomp/rules/xfree86
xc/programs/xkbcomp/rules/xfree86
-- xc.orig/programs/xkbcomp/rules/xfree86 2002-12-17 22:25:01.000000000
+0100
+++ xc/programs/xkbcomp/rules/xfree86 2002-12-17 22:29:42.000000000
+0100
@@ -26,7 +26,7 @@
   abnt2 = xfree86(abnt2)
   * = xfree86

-! $azerty = be fr
+! $azerty = be fr fr-latin9
! $qwertz = al cz de hr pl2 si sk

! layout[1] = keycodes
diff -uNr xc.orig/programs/xkbcomp/rules/xfree86.lst
xc/programs/xkbcomp/rules/xfree86.lst
-- xc.orig/programs/xkbcomp/rules/xfree86.lst 2002-12-17
22:25:01.000000000 +0100
+++ xc/programs/xkbcomp/rules/xfree86.lst 2002-12-17 22:33:33.000000000
+0100
@@ -125,6 +125,7 @@
   ir Farsi
   fi Finnish
   fr French
+  fr-latin9 French (alternative)
   fr_CH Swiss French
   ge_la Georgian (latin)
   ge_ru Georgian (russian)
diff -uNr xc.orig/programs/xkbcomp/symbols/pc/fr-latin9
xc/programs/xkbcomp/symbols/pc/fr-latin9
-- xc.orig/programs/xkbcomp/symbols/pc/fr-latin9 1970-01-01
01:00:00.000000000 +0100
+++ xc/programs/xkbcomp/symbols/pc/fr-latin9 2002-12-17
22:46:41.000000000 +0100
@@ -0,0 +1,167 @@
+// Historic Linux french keyboard layout (fr-latin9)
+// Copyright (c) 199x, 2002 Rene Cougnenc (original work)
+//                          Guylhem Aznar <guylhem @ oeil.qc.ca>
(maintainer)
+//                          Nicolas Mailhot <Nicolas.Mailhot @
laposte.net>
+//                              (XFree86 submission)
+//
+//  $XFree86:$
+//
+// This layout has long been distributed and refined outside official
channels.
+// To this day it remains more feature-rich and popular than the 'fr'
layout.
+//
+// Please send all fixes to Guylhem Aznar <guylhem @ oeil.qc.ca> so he
can sync
+// the identically named linux console map (kbd, linux-console). The
latest
+// out-of-tree version of this map is always available via :
+//
+// http://www.tldp.org/HOWTO/Francophones-HOWTO.html
+//
+// under a GPL license.
+//
+// Now follows the keyboard design description in French.
+// (If you can't read it you probably have no business changing this
file anyway:)
+//
+// Les accents circonflexes des principales voyelles sont obtenus avec
+// la touche Alt_Gr, les tr�mas sont obtenus par Alt_Gr + Shift.
+//
+//  ____                                     _________ _____________
_______
+// | S A| S = Shift,  A = AltGr + Shift     | Imprime | Arr�t d�fil |
Pause |
+// | s a| s = normal, a = AltGr             |  Exec   |             |
Halte |
+//  ����                                     ��������� �������������
�������
+//  ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____
_______
+// | � "| 1 �| 2 �| 3 ,| 4 '| 5 "| 6 || 7 �| 8 �| 9 �| 0 �| � �| + �|
<--   |
+// | � "| & '| � ~| " #| ' {| ( [| - || � `| _ \| � ^| � @| ) ]| =
}|       |
+// 
========================================================================
+// | |<-  | A �| Z �| E �| R �| T �| Y �| U �| I �| O �| P '| " `| $
�|   , |
+// |  ->| | a �| z �| e �| r �| t �| y �| u �| i �| o �| p �| ^ ~| � �|
<-' |
+// 
===================================================================�   
|
+// |       | Q �| S �| D �| F �| G �| H �| J �| K �| L �| M �| % �| �
�|    |
+// | MAJ   | q �| s �| d �| f �| g �| h �| j �| k �| l �| m �| � �| *
�|    |
+// 
========================================================================
+// | ^   | >  | W  | X  | C  | V  | B  | N  | ?  | .  | /  | �  |    
^     |
+// | |   | < || w �| x �| c �| v �| b �| n �| , �| ; �| : �| ! �|    
|     |
+// 
========================================================================
+// |      |      |      |                       |       |      |    
|      |
+// | Ctrl | Meta | Alt  | Space    Nobreakspace | AltGr | Multi|Menu |
Ctrl |
+//  ������ ������ ������ ����������������������� ������� ������ �����
������
+//
+//
+// Si les touches mortes fonctionnent, utiliser les accents dits
+// � morts �, i.e. fonctionnant comme l'accent circonflexe & le
+// tr�ma des machines � �crire ; sont disponibles :
+//
+// (^) : accent circonflexe,
+// Shift+(^) : tr�ma,
+// Shift+AltGr (^) : tilde,
+// AltGr (1) : accent aigu,
+// AltGr (7) : accent grave
+//
+// Pour s'en servir, proc�der comme avec l'accent circonflexe & le
tr�ma
+// sur les vielles machines � �crire :
+//
+// AltGr (1) puis e : �
+// Shift+AltGr (1) puis e : � ...
+
+partial default alphanumeric_keys
+
+xkb_symbols "basic" {
+
+    include "pc/latin"
+
+    name[Group1]="fr-latin9";
+
+    key <TLDE> { [              oe,              OE,
leftdoublequotemark, rightdoublequotemark ] };
+    key <AE01> { [       ampersand,               1,         
dead_acute,       periodcentered ] };
+    key <AE02> { [          eacute,               2,         
asciitilde,               Eacute ] };
+    key <AE03> { [        quotedbl,               3,         
numbersign,              cedilla ] };
+    key <AE04> { [      apostrophe,               4,          
braceleft,                acute ] };
+    key <AE05> { [       parenleft,               5,        
bracketleft,            diaeresis ] };
+    key <AE06> { [           minus,               6,                
bar,            brokenbar ] };
+    key <AE07> { [          egrave,               7,         
dead_grave,               Egrave ] };
+    key <AE08> { [      underscore,               8,          
backslash,               macron ] };
+    key <AE09> { [        ccedilla,               9,        
asciicircum,             Ccedilla ] };
+    key <AE10> { [          agrave,               0,                 
at,               Agrave ] };
+    key <AE11> { [      parenright,          degree,       
bracketright,           ydiaeresis ] };
+    key <AE12> { [           equal,            plus,         
braceright,       dead_abovering ] };
+
+    key <AD01> { [               a,               A,        
acircumflex,           adiaeresis ] };
+    key <AD02> { [               z,               Z,              
aring,                Aring ] };
+    key <AD03> { [               e,               E,           
EuroSign,                 cent ] };
+    key <AD04> { [               r,               R,           
ccedilla,             Ccedilla ] };
+    key <AD05> { [               t,               T,              
thorn,                THORN ] };
+    key <AD06> { [               y,               Y,             
yacute,               Yacute ] };
+    key <AD07> { [               u,               U,        
ucircumflex,           udiaeresis ] };
+    key <AD08> { [               i,               I,        
icircumflex,           idiaeresis ] };
+    key <AD09> { [               o,               O,        
ocircumflex,           odiaeresis ] };
+    key <AD10> { [               p,               P,          
paragraph,            quoteleft ] };
+    key <AD11> { [ dead_circumflex,  dead_diaeresis,         
dead_tilde,           quoteright ] };
+    key <AD12> { [          dollar,     sterling,        
ecircumflex,           ediaeresis ] };
+
+    key <AC01> { [               q,               Q,        
Acircumflex,           Adiaeresis ] };
+    key <AC02> { [               s,               S,             
oslash,             Ooblique ] };
+    key <AC03> { [               d,               D,        
Ecircumflex,           Ediaeresis ] };
+    key <AC04> { [               f,               F,          
plusminus,          ordfeminine ] };
+    key <AC05> { [               g,               G,                 
ae,                   AE ] };
+    key <AC06> { [               h,               H,                
eth,                  ETH ] };
+    key <AC07> { [               j,               J,        
Ucircumflex,           Udiaeresis ] };
+    key <AC08> { [               k,               K,        
Icircumflex,           Idiaeresis ] };
+    key <AC09> { [               l,               L,        
Ocircumflex,           Odiaeresis ] };
+    key <AC10> { [               m,               M,        
onesuperior,            masculine ] };
+    key <AC11> { [          ugrave,         percent,        
twosuperior,               Ugrave ] };
+    key <BKSL>  { [        asterisk,              mu,      
threesuperior,                  yen ] };
+
+    key <LSGT> { [            less,         greater,                
bar                       ] };
+    key <AB01> { [               w,               W,      
guillemotleft         ] };
+    key <AB02> { [               x,               X,     
guillemotright                       ] };
+    key <AB03> { [               c,               C,          
copyright                       ] };
+    key <AB04> { [               v,               V,         
registered         ] };
+    key <AB05> { [               b,               B,             
ssharp                       ] };
+    key <AB06> { [               n,               N,            
notsign                       ] };
+    key <AB07> { [           comma,        question,       
questiondown                       ] };
+    key <AB08> { [       semicolon,          period,           
multiply         ] };
+    key <AB09> { [           colon,           slash,           
division                       ] };
+    key <AB10> { [          exclam,         section,         
exclamdown                       ] };
+
+    key <SPCE>  { [           space,           space,       
nobreakspace                       ] };
+
+    // French uses a comma as decimal separator, but keyboards are
labeled with a period
+    key <KPDL>  { [       KP_Delete,          period,          
KP_Delete,           KP_Decimal ] };
+
+    key <RALT>  { type[Group1]="TWO_LEVEL",
+                  [ ISO_Level3_Shift, Multi_key ] };
+
+    modifier_map Mod5   { <RALT> };
+
+};
+
+partial alphanumeric_keys
+xkb_symbols "Sundeadkeys" {
+
+    // Modifies the basic fr-latin9 layout to use the Sun dead keys
+
+    include "pc/fr-latin9(basic)"
+
+    key <AE01> { [       ampersand,               1,        
SunFA_Acute,       periodcentered ] };
+    key <AE07> { [          egrave,               7,        
SunFA_Grave,               Egrave ] };
+    key <AD11> { [    SunFA_Circum, SunFA_Diaeresis,        
SunFA_Tilde,           quoteright ] };
+
+};
+
+partial alphanumeric_keys
+xkb_symbols "sundeadkeys" {
+
+    include "pc/fr-latin9(Sundeadkeys)"
+
+};
+
+partial alphanumeric_keys
+xkb_symbols "nodeadkeys" {
+
+    // Modifies the basic fr-latin9 layout to eliminate all dead keys
+
+    include "pc/fr-latin9(basic)"
+
+    key <AE01> { [       ampersand,               1,         
apostrophe,       periodcentered ] };
+    key <AE07> { [          egrave,               7,              
grave,               Egrave ] };
+    key <AE12> { [           equal,            plus,         
braceright                 ] };
+    key <AD11> { [ asciicircum,     diaeresis,         
asciitilde,           quoteright ] };
+};
diff -uNr xc.orig/programs/xkbcomp/symbols/pc/Imakefile
xc/programs/xkbcomp/symbols/pc/Imakefile
-- xc.orig/programs/xkbcomp/symbols/pc/Imakefile 2002-12-17
22:25:01.000000000 +0100
+++ xc/programs/xkbcomp/symbols/pc/Imakefile 2002-12-17
22:44:15.000000000 +0100
@@ -7,7 +7,7 @@
cz cz_qwerty \
de dev dk dvorak \
ee el en_US es \
- fi fr \
+ fi fr fr-latin9 \
gb ge_la ge_ru guj gur \
hr \
ie il il_phonetic ir is it iu \


Cheers,

-- 
Nicolas Mailhot

Attachment: signature.asc
Description: Ceci est une partie de message=?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=

Reply via email to