Hi list.

Here is the "Iranian" experimental keyboard layout file for X window (xkb subsystem). Installation guides for Yarrow and Tettnang (Fedora Core 1 & 2) are attached, too.

Please send your suggestions and bug-reports to this mailing-list, or <[EMAIL PROTECTED]>.


Regards, -Behnam.Esfahbod
// Iranian keyboard layout,
// based on National Iranian Keyboard Standard (ISIRI 2901:1994),
// with additions.
//
// Copyright (C) 2004  Sharif FarsiWeb, Inc.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
// 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
// 
// A copy of the GNU General Public License is available from
// <http://www.gnu.org/licenses/gpl.txt>.
//
// Author: Behnam Esfahbod <[EMAIL PROTECTED]>
//


// 3-Level layout

partial default alphanumeric_keys
xkb_symbols "basic" {
    name[Group1]= "Iranian";

    include "level3(ralt_switch_multikey)"

    // Persian digits
    key <AE01> { [ 0x10006f1,   exclam,         quoteleft               ] };
    key <AE02> { [ 0x10006f2,   0x100066c,      at                      ] };
    key <AE03> { [ 0x10006f3,   0x100066b,      numbersign              ] };
    key <AE04> { [ 0x10006f4,   0x100fdfc,      dollar                  ] };
    key <AE05> { [ 0x10006f5,   0x100066a,      percent                 ] };
    key <AE06> { [ 0x10006f6,   multiply,       asciicircum             ] };
    key <AE07> { [ 0x10006f7,   Arabic_comma,   ampersand               ] };
    key <AE08> { [ 0x10006f8,   asterisk,       enfilledcircbullet      ] };
    key <AE09> { [ 0x10006f9,   parenright,     0x100200e               ] };
    key <AE10> { [ 0x10006f0,   parenleft,      0x100200f               ] };

    // Other 3-Level symbols
    key <TLDE> { [ 0x100200d,           division,               asciitilde      ] };
    key <AE11> { [ minus,               Arabic_tatweel,         underscore      ] };
    key <AE12> { [ equal,               plus,                   0x1002212       ] };
    key <BKSL> { [ backslash,           bar,                    0x1002010       ] };
    key <SPCE> { [ space,               0x100200c,              nobreakspace    ] };

    key <AD01> { [ Arabic_dad,          Arabic_sukun,           degree          ] };
    key <AD02> { [ Arabic_sad,          Arabic_dammatan         ] };
    key <AD03> { [ Arabic_theh,         Arabic_kasratan,        0x13a4          ] };
    key <AD04> { [ Arabic_qaf,          Arabic_fathatan         ] };
    key <AD05> { [ Arabic_feh,          Arabic_damma            ] };
    key <AD06> { [ Arabic_ghain,        Arabic_kasra            ] };
    key <AD07> { [ Arabic_ain,          Arabic_fatha            ] };
    key <AD08> { [ Arabic_heh,          Arabic_shadda,          0x100202d       ] };
    key <AD09> { [ Arabic_khah,         bracketright,           0x100202e       ] };
    key <AD10> { [ Arabic_hah,          bracketleft,            0x100202c       ] };
    key <AD11> { [ Arabic_jeem,         braceright,             0x100202a       ] };
    key <AD12> { [ 0x1000686,           braceleft,              0x100202b       ] };

    key <AC01> { [ Arabic_sheen,        Arabic_hamzaonwaw       ] };
    key <AC02> { [ Arabic_seen,         Arabic_hamzaonyeh       ] };
    key <AC03> { [ 0x10006cc,           Arabic_yeh,             Arabic_alefmaksura ] };
    key <AC04> { [ Arabic_beh,          Arabic_hamzaunderalef   ] };
    key <AC05> { [ Arabic_lam,          Arabic_hamzaonalef      ] };
    key <AC06> { [ Arabic_alef,         Arabic_maddaonalef,     0x1000671       ] };
    key <AC07> { [ Arabic_teh,          Arabic_tehmarbuta       ] };
    key <AC08> { [ Arabic_noon,         guillemotright,         0x100fd3e       ] };
    key <AC09> { [ Arabic_meem,         guillemotleft,          0x100fd3f       ] };
    key <AC10> { [ 0x10006a9,           colon,                  semicolon       ] };
    key <AC11> { [ 0x10006af,           Arabic_semicolon,       quotedbl        ] };

    key <AB01> { [ Arabic_zah,          Arabic_kaf              ] };
    key <AB02> { [ Arabic_tah,          0x1000653               ] };
    key <AB03> { [ Arabic_zain,         0x1000698               ] };
    key <AB04> { [ Arabic_ra,           0x1000670,              0x1000656       ] };
    key <AB05> { [ Arabic_thal,         0x100200c,              0x100200d       ] };
    key <AB06> { [ Arabic_dal,          0x1000654,              0x1000655       ] };
    key <AB07> { [ 0x100067e,           Arabic_hamza,           ellipsis        ] };
    key <AB08> { [ Arabic_waw,          greater,                comma           ] };
    key <AB09> { [ period,              less,                   apostrophe      ] };
    key <AB10> { [ slash,               Arabic_question_mark,   question        ] };
};


// 4-Level leyout

partial alphanumeric_keys
xkb_symbols "pro" {
    include "pc/ir(basic)"

    // Persian and English (ASCII) digits
    key <AE01> { [ 0x10006f1,   exclam,         quoteleft,              1       ] };
    key <AE02> { [ 0x10006f2,   0x100066c,      at,                     2       ] };
    key <AE03> { [ 0x10006f3,   0x100066b,      numbersign,             3       ] };
    key <AE04> { [ 0x10006f4,   0x100fdfc,      dollar,                 4       ] };
    key <AE05> { [ 0x10006f5,   0x100066a,      percent,                5       ] };
    key <AE06> { [ 0x10006f6,   multiply,       asciicircum,            6       ] };
    key <AE07> { [ 0x10006f7,   Arabic_comma,   ampersand,              7       ] };
    key <AE08> { [ 0x10006f8,   asterisk,       enfilledcircbullet,     8       ] };
    key <AE09> { [ 0x10006f9,   parenright,     0x100200e,              9       ] };
    key <AE10> { [ 0x10006f0,   parenleft,      0x100200f,              0       ] };
};

################################################################################
###   Iranian Keyboard Layout Installing Guide for Yarrow (Fedora Core 1)    ###
################################################################################
### Author: Behnam Esfahbod <[EMAIL PROTECTED]>,  Sharif FarsiWeb, Inc.   ###

### Installation:

Download the "ir" file on your machine.  (Your can get it from
http://www.orkut.com/AlbumZoom.aspx?uid=1974856125494644234&pid=6 anytime)

Login a command-line terminal as "root" and run this commands:
  cd /usr/X11R6/lib/X11/xkb/symbols/pc
  mv ir ir.old

Copy your downloaded "ir" file to "/usr/X11R6/lib/X11/xkb/symbols/pc/".


Now you have the new "Iranian Experimental Keyboard Layout" installed.  If you
was using "Iranian" layout before this installation, you are done.  Otherwise,
you need to configure your X server to use "Iranian" keyboard layout as second
group layout.


### Configuring X server:

Login a command-line terminal as user, and in the terminal enter the following
line and hit enter:

  echo setxkbmap us,ir -option grp:alt_shift_toggle,grp_led:scroll > ~/.Xkbmap


Then restart your GNOME session.  Now you should be able to switch to Persian by
pressing Alt+Shift.  The Scroll Bar LED will turn on to indicate the Persian
mode.  The same Alt+Shift combination brings you back to English mode.

################################################################################
###  Iranian Keyboard Layout Installing Guide for Tettnang (Fedora Core 2)   ###
################################################################################
### Author: Behnam Esfahbod <[EMAIL PROTECTED]>,  Sharif FarsiWeb, Inc.   ###

### Installation:

Download the "ir" file on your machine.  (Your can get it from
http://www.orkut.com/AlbumZoom.aspx?uid=1974856125494644234&pid=6 anytime)

Login a command-line terminal as "root" and run this commands:
  cd /usr/X11R6/lib/X11/xkb/symbols/pc
  mv ir ir.old

Copy your downloaded "ir" file to "/usr/X11R6/lib/X11/xkb/symbols/pc/".


Now you have the new "Iranian Experimental Keyboard Layout" installed.  If you
was using "Iranian" layout before this installation, you are done.  Otherwise,
you need to configure your X server to use "Iranian" keyboard layout as second
group layout.


### Configuring X server:

Login to your account and choose GNOME desktop.  Now do these:

  - Go to "Applications" -> "Preferences" -> "Keyboard".
  - Select "Layouts" tab.
  - Select "Farsi" (*) and then click on the "Add" button.
  - Now select the "Layout Options" tab.
  - From the "Group Shift/Lock behavior" select "Alt+Shift changes group",
    and click on the "Add" button.
  - And also from the "Use keyboard LED to show alternative group" select
    "Scroll_Lock LED shows alternative group", and click on the "Add"
    button.
  - Now click on "Close" button.


Then restart your GNOME session.  Now you should be able to switch to Persian by
pressing Alt+Shift.  The Scroll Bar LED will turn on to indicate the Persian
mode.  The same Alt+Shift combination brings you back to English mode.


(*) This is a bug on xkb, and will change to "Iranian".

_______________________________________________
PersianComputing mailing list
[EMAIL PROTECTED]
http://lists.sharif.edu/mailman/listinfo/persiancomputing

Reply via email to