dominiko (dominiko) wrote,
dominiko
dominiko

C'HWERTY keyboard in Ubuntu-9.10 / Klavaro C'HWERTY en Ubuntu-9.10

en Patches to add support of the Breton C'HWERTY keyboard have been partially included in Ubuntu-9.10. Unfortunately a few things are still missing in Ubuntu-9.10 to make it work without additional tweaks:
  • Support of the caps lock key for keys C´H and CH requires patching files /usr/share/X11/xkb/symbols/fr and /usr/share/X11/xkb/types/extra as follows:
    pel@pel-laptop:~$ diff -c /usr/share/X11/xkb/symbols/fr.orig /usr/share/X11/xkb/symbols/fr
    *** /usr/share/X11/xkb/symbols/fr.orig	2009-11-29 14:04:18.372308169 +0100
    --- /usr/share/X11/xkb/symbols/fr	2009-11-29 15:00:22.293311210 +0100
    ***************
    *** 723,730 ****
          // Second row
          // Handling the C'H key correctly requires an inputmethod (XIM)
          // See https://bugs.freedesktop.org/show_bug.cgi?id=19506
    !  // key <AD01> { [    trigraph_c_h,   trigraph_C_h,    trigraph_C_H,    Greek_alpha ] };
    !     key <AD01> { [           UF8FD,          UF8FE,           UF8FF,    Greek_alpha ] };
          key <AD02> { [               w,              W,     Greek_omega,    Greek_omega ] };
          key <AD03> { [               e,              E,        EuroSign,  Greek_epsilon ] };
          key <AD04> { [               r,              R,       Greek_rho,      Greek_rho ] };
    --- 723,732 ----
          // Second row
          // Handling the C'H key correctly requires an inputmethod (XIM)
          // See https://bugs.freedesktop.org/show_bug.cgi?id=19506
    !  // key <AD01> { type[group1] = "FOUR_LEVEL_C_HWERTY", 
    !  //              [    trigraph_c_h,   trigraph_C_h,    trigraph_C_H,    Greek_alpha ] };
    !     key <AD01> { type[group1] = "FOUR_LEVEL_C_HWERTY", 
    !                  [           UF8FD,          UF8FE,           UF8FF,    Greek_alpha ] };
          key <AD02> { [               w,              W,     Greek_omega,    Greek_omega ] };
          key <AD03> { [               e,              E,        EuroSign,  Greek_epsilon ] };
          key <AD04> { [               r,              R,       Greek_rho,      Greek_rho ] };
    ***************
    *** 761,768 ****
          key <AB06> { [               n,              N,        Greek_nu,       Greek_nu ] };
          // Handling the CH key correctly requires an inputmethod (XIM)
          // See https://bugs.freedesktop.org/show_bug.cgi?id=19506
    !  // key <AB07> { [      digraph_ch,     digraph_Ch,      digraph_CH,  Greek_omicron ] };
    !     key <AB07> { [           UF8FA,          UF8FB,           UF8FC,  Greek_omicron ] };
          key <AB08> { [          ntilde,         Ntilde                                  ] };
          key <AB09> { [          period,          colon,         section,      copyright ] };
          key <AB10> { [           comma,      semicolon,         percent                 ] };
    --- 763,772 ----
          key <AB06> { [               n,              N,        Greek_nu,       Greek_nu ] };
          // Handling the CH key correctly requires an inputmethod (XIM)
          // See https://bugs.freedesktop.org/show_bug.cgi?id=19506
    !  // key <AB07> { type[group1] = "FOUR_LEVEL_C_HWERTY", 
    !  //              [      digraph_ch,     digraph_Ch,       digraph_CH, Greek_omicron ] };
    !     key <AB07> { type[group1] = "FOUR_LEVEL_C_HWERTY", 
    !                  [           UF8FA,          UF8FB,            UF8FC, Greek_omicron ] };
          key <AB08> { [          ntilde,         Ntilde                                  ] };
          key <AB09> { [          period,          colon,         section,      copyright ] };
          key <AB10> { [           comma,      semicolon,         percent                 ] };
    
    pel@pel-laptop:~$ diff -c /usr/share/X11/xkb/types/extra.orig /usr/share/X11/xkb/types/extra
    *** /usr/share/X11/xkb/types/extra.orig	2009-11-29 14:23:11.416291776 +0100
    --- /usr/share/X11/xkb/types/extra	2009-11-29 14:42:02.116291991 +0100
    ***************
    *** 139,144 ****
    --- 139,165 ----
              level_name[Level4] = "Shift Alt";
              level_name[Level5] = "Lock";
          };
    + 
    + // Type for Breton keyboard C'HWERTY.
    + // It makes it possible to type the C'H C'h c'h trigraphs
    + // and CH Ch ch digraphs present on the keyboard.
    + // When typing capsLock, this key type is needed to
    + // output C'H and CH.
    +     type "FOUR_LEVEL_C_HWERTY" {
    +         modifiers = Shift+Lock+LevelThree;
    +         map[None] = Level1;
    +         map[Shift] = Level2;
    +         map[LevelThree] = Level3;
    +         map[Shift+LevelThree] = Level4;
    +         map[Lock]  = Level3;
    +         map[Lock+Shift] = Level1;
    +         map[Lock+LevelThree] = Level2;
    +         map[Lock+Shift+LevelThree] = Level4;
    +         level_name[Level1] = "Base";
    +         level_name[Level2] = "Shift";
    +         level_name[Level3] = "Alt Base";
    +         level_name[Level4] = "Shift Alt";
    +     };
      };
      
      // This enables the four level shifting also for the keypad.
    
  • Keysyms of trigraph C´H and digraph CH have not yet been added in X11. So until this is done in X11, supporting the Breton C'HWERTY keyboard requires private-use keysyms which can be done by adding a file ~/.XCompose:
    pel@pel-laptop:~$ cat ~/.XCompose
    #
    # Breton trigraph & digraphs
    # Dominique Pellé <dominique.pelle@gmail.com>
    #
    #<digraph_ch> : "ch"
    #<digraph_Ch> : "Ch"
    #<digraph_CH> : "CH"
    
    #<trigraph_c_h> : "c´h"
    #<trigraph_C_h> : "C´h"
    #<trigraph_C_H> : "C´H"
    
    <UF8FA> : "ch"
    <UF8FB> : "Ch"
    <UF8FC> : "CH"
    
    <UF8FD> : "c´h"
    <UF8FE> : "C´h"
    <UF8FF> : "C´H"
    
  • Support of the C´H and CH keys requires an input methode (XIM). XIM can be enabled by adding "export GTK_IM_MODULE=xim" in file /etc/environment:
    pel@pel-laptop:~$ diff -c /etc/environment.orig /etc/environment
    *** /etc/environment.orig	2009-11-29 15:07:34.916311751 +0100
    --- /etc/environment	2009-11-29 14:14:08.676291508 +0100
    ***************
    *** 1 ****
    --- 1,2 ----
      PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
    + export GTK_IM_MODULE=xim
    
After doing all those changes, the C'HWERTY keyboard works fine in Ubuntu-9.10. I've opened bug#: 25349 to track the issues.

eo Flikaĵoj por funkciigi la bretonan klavaron C'HWERTY estas nun parte en Ubuntu-9.10. Bedaŭrinde, kelkaj aĵoj ankoraŭ mankas en Ubuntu-9.10 por ke ĝi funkciu sen aldonaj agordaĵoj:

  • Funkciigi la klavojn C´H kaj CH bezonigas enan metodon (XIM). XIM ŝalteblas per aldono de "export GTK_IM_MODULE=xim" en la dosiero /etc/environment.
  • Subteno de la majuskla baskulo por la klavoj CH and C´h bezonigas aldonajn flikaĵojn de la dosieroj /usr/share/X11/xkb/symbols/fr kaj /usr/share/X11/xkb/types/extra.
  • Subteno de la klavoj C´H kaj CH ne estas ankoraŭ aldonitaj en X11. Ĝis tiam, oni devas aldoni signojn por privata uzo en la dosiero ~/.XCompose.
Post ĉiuj tiuj ŝanĝoj, la klavaro C'HWERTY bone funkcias en Ubuntu-9.10.

br N'a ket mat en dro siwazh ar c´hlavier C'HWERTY dindan Ubuntu-9.10 c´hoazh hep un tamm labour. Met aes a-walc´h eo dresañ pep tra memes tra evel displeget uheloc´h.

Tags: gnu/linukso
Subscribe

  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 0 comments