← Back to team overview

ubuntu-x-swat team mailing list archive

[Bug 483142] [NEW] wishlist: adding YaZhERT and other types of russian phonetic layouts

 

Public bug reported:

Binary package hint: xkeyboard-config


There are many types of Russian Phonetic layouts... (ie, russian layouts for people typing on US style keyboards, not the Russian style keyboards). 
 
Please see http://en.wikipedia.org/wiki/Keyboard_layout#Russian for more information. 

I was working on a patch to add some of these phonetic layouts that I am
guessing would be useful.  I was unable to finish my patch properly, for
various reasons (see the end of this post for an explanation).

However, before I delete my work off my computer, I thought I would post
the basics of what i did here... if only so that someone else might find
a 'starting point' or some hints, if they want to do a proper patch in
the future.

Oh yes, there is a PPA (and .deb) of the patch i worked on... on my
ubuntu 9.04 system... before I gave up. It seems to work properly for
me.

https://launchpad.net/~decora/+archive/ppa
.deb file (download and use dpkg -i to install): https://launchpad.net/~decora/+archive/ppa/+files/xkb-data_1.5-2ubuntu12~ppa0~jaunty_all.deb 

I can't post the whole .diff patch, because of weirdness i dont
understand in xkeyboard-config it includes a bunch of junk you dont need
in the diff, so here is the code 'in english':

----

you get the xkeyboard-config-1.5 source code (apt-get source xkeyboard-
config).

To the file xkeyboard-config-1.5/symbols/us you add this (right after
existing Russian entry.. dont delete the russian entry that is there
already!!):

// Russian Phonetic - YaZhERT style. 
// based on Paul Gorodyansky's Virtual Russian Keyboard
// http://www.russianaa-brooklyn.com/VirtKbd/screen_e.htm
// Accessed on 2009 9 13
// also based on Ivan Papov's layout, elsewhere in this file
partial alphanumeric_keys
xkb_symbols "us_rus_yazhert" {

    name[Group1]= "USA - Russian Phonetic - YaZhERT";

    include "us(rus)"

    key.type[group1]="FOUR_LEVEL_ALPHABETIC";

    key	<TLDE> {	[ Cyrillic_yu, Cyrillic_YU, grave, asciitilde ]	};
    key	<AE02> {	[ 2, Cyrillic_hardsign, at, at ]	};
    key	<AE03> {	[ 3, Cyrillic_HARDSIGN, numbersign, numbersign ]	};
    key	<AE06> {	[ 6, Cyrillic_io, asciicircum, asciicircum ]	};
    key	<AE07> {	[ 7, Cyrillic_IO, ampersand, ampersand ]	};
    key	<AE12> {	[ Cyrillic_softsign, Cyrillic_SOFTSIGN, equal, plus ]	};

    key	<LatW> {	[ Cyrillic_zhe,	Cyrillic_ZHE ]	};
    key	<LatH> {	[ Cyrillic_che,	Cyrillic_CHE ]	};
    key	<LatX> {	[ Cyrillic_ha, Cyrillic_HA ]	};
    key	<LatV> {	[ Cyrillic_ve, Cyrillic_VE ]	};

    key	<AD11> {	[ Cyrillic_sha,	Cyrillic_SHA, bracketleft, braceleft ]	};
    key	<AD12> {	[ Cyrillic_shcha, Cyrillic_SHCHA, bracketright, braceright ]	};
    key	<BKSL> {	[ Cyrillic_e, Cyrillic_E, backslash, bar ]	};

    include "level3(ralt_switch)"
};

// Russian Phonetic Mac - trying to copy Macintosh OS X Russian Phonetic
// (Which is basically a YaShERT layout with some small differences).
// See for example: http://brad.livejournal.com/2284345.html
// Accessed on 2009 9 13
// (not sure about some of it.. dont have a Mac...)
// i.e. how do you type Cyrillic_IO
partial alphanumeric_keys
xkb_symbols "us_rus_yashert_mac" {

    name[Group1]= "USA - Russian Phonetic - YaShERT (Mac)";

    include "us(rus)"

    key.type[group1]="FOUR_LEVEL_ALPHABETIC";

    key	<TLDE> {	[ Cyrillic_SHCHA, Cyrillic_SHCHA ]	};
    key	<AE02> {	[ 2, Cyrillic_io ]	};
    key	<AE03> {	[ 3, euro ]	};
    key	<AE04> {	[ 4, dollar ]	};
    key	<AE11> {	[ Cyrillic_softsign, Cyrillic_SOFTSIGN ]	};
    key	<AE12> {	[ Cyrillic_hardsign, Cyrillic_HARDSIGN ]	};

    key	<LatW> {	[ Cyrillic_sha,	Cyrillic_SHA ]	};
    key	<LatH> {	[ Cyrillic_che,	Cyrillic_CHE ]	};
    key	<LatX> {	[ Cyrillic_ha, Cyrillic_HA ]	};
    key	<LatV> {	[ Cyrillic_ve, Cyrillic_VE ]	};

    key	<AD11> {	[ Cyrillic_yu, Cyrillic_YU ]	};
    key	<AD12> {	[ Cyrillic_zhe,	Cyrillic_ZHE ]	};
    key	<BKSL> {	[ Cyrillic_e, Cyrillic_E ]	};

    include "level3(ralt_switch)"
};

// Russian Phonetic - YaShERT style, the AATSEEL Student layout variation. 
// (AATSEEL = American Association of Teachers of Slavic and East European Languages)
// Based on Paul Gorodyansky's Virtual Russian Keyboard
// http://www.russianaa-brooklyn.com/VirtKbd/screen_e.htm
// Accessed on 2009 9 16
partial alphanumeric_keys
xkb_symbols "us_rus_yashert_aatseel" {

    name[Group1]= "USA - Russian Phonetic - YaShERT (AATSEEL Student)";

    include "us(rus)"

    key.type[group1]="FOUR_LEVEL_ALPHABETIC";

    key	<TLDE> {	[ Cyrillic_e, Cyrillic_E, grave, asciitilde ]	};
    key	<AE02> {	[ 4, quote, dollar, dollar ]	};
    key	<AE03> {	[ 5, colon, percent, percent ]	};
    key	<AE12> {	[ Cyrillic_hardsign, Cyrillic_HARDSIGN, equal, plus ]	};

    key	<LatW> {	[ Cyrillic_sha,	Cyrillic_SHA ]	};
    key	<LatH> {	[ Cyrillic_che,	Cyrillic_CHE ]	};
    key	<LatX> {	[ Cyrillic_ha, Cyrillic_HA ]	};
    key	<LatV> {	[ Cyrillic_ve, Cyrillic_VE ]	};

    key	<AD11> {	[ Cyrillic_yu,	Cyrillic_YU, bracketleft, braceleft ]	};
    key	<AD12> {	[ Cyrillic_shcha, Cyrillic_SHCHA, bracketright, braceright ]	};
    key	<BKSL> {	[ Cyrillic_e, Cyrillic_E, backslash, bar ]	};

    key	<AC10> {	[ Cyrillic_softsign, Cyrillic_SOFTSIGN, semicolon, colon ]	};
    key	<AC11> {	[ Cyrillic_zhe, Cyrillic_ZHE, apostrophe, quotedbl ]	};

    include "level3(ralt_switch)"
};


To the file xkeyboard-config-1.5/rules/base.xml.in you add this
(replacing old Russian <variant> section.. which is redescribed as
YaVERT in my code):

         <variant>
          <configItem>
            <name>rus</name>
            <_description>Russian Phonetic - YaVERT</_description>
            <languageList><iso639Id>rus</iso639Id></languageList>
          </configItem>
        </variant>
        <variant>
          <configItem>
            <name>us_rus_yazhert</name>
            <_description>Russian Phonetic - YaZhERT</_description>
            <languageList><iso639Id>rus</iso639Id></languageList>
          </configItem>
        </variant>
        <variant>
          <configItem>
            <name>us_rus_yashert_mac</name>
            <_description>Russian Phonetic - YaShERT (Mac)</_description>
            <languageList><iso639Id>rus</iso639Id></languageList>
          </configItem>
        </variant>
        <variant>
          <configItem>
            <name>us_rus_yashert_aatseel</name>
            <_description>Russian Phonetic - YaShERT (AATSEEL Student)</_description>
            <languageList><iso639Id>rus</iso639Id></languageList>
          </configItem>
        </variant>


then you do ./configure, make, make install, and it should work. In system/preferences/keyboard 
layouts/add, under language 'russian' you should then have 4 variants.. yavert, yazhert, yashert Mac and yashert AATSEEL. 

-- the end


ISSUES

ISSUE THE FIRST

In Ubuntu currently there are actually TWO basically similar russian
phonetic layouts, one has been put under the 'symbols/ru' file and one
under the 'symbols/us' file.

Part of the reason was the old 'us' version didnt have a proper language tag so it looked like there was only one, when you searched by 'russian language'. 
( see https://bugs.launchpad.net/ubuntu/+source/xkeyboard-config/+bug/429034 )

But also its because, IMHO, of the confusion inherent in the xkeyboard
design which uses vague concepts of 'country' and 'layout' as
separated... so when you go to search for a layout to use in your layout
selector, you can search by 'country' or by 'language'...

In reality it should let you search by 'what language is your keyboard
designed for (and what is it's exact layout)' and then also 'what
language are you wanting to type in'. but ... you know.. whatever. we
are stuck with what we got.

So --WHY-- did I put my layout under 'us'? Because, technically, my
layouts are for a 'US keyboard', for people typing on US keyboards. That
is the whole point of Russian Phonetic layouts in the first place...
allow people in the US learning russian to type russian in a relatively
easy manner (ie, A=A, G=г, etc... instead of haing to learn the 'real
native' way that keyboards in russia are layed out).

Furthermore, I looked at the precedent.. Russian Polish Phonetic Dvorak
(ie , typing russian on a polish keyboard) is under 'symbols/pl' not
'symbols/ru'. Sweden Russian Phonetic (ie, typing russian on a swedish
keyboard) is under 'symbols/se' not 'symbols/ru'. ... of course there
are other precedents that might contradict this (ukranian phonetic in
ue?). But i went with the assumption that USA Russian Phonetic (ie,
typing russian on a US keyboard), should thus go in symbols/us, not
symbols/ru.


ISSUE THE SECOND

Now...why didn't i finish the patch properly?

1. i barely know any russian so im not confident of my work
2. i dont have the energy to undo all my work and break it into a separate patch for each layout, which is what would be 'proper'
2.a. xkeyboard-layout is weird because it uses .xml.in files and the patch winds up being really funky
2.b. ubuntu's launchpad 'patch creation' documents are a bit hard for me to understand. i could probably do it right after a few tries but... again... lack of energy
3. no access to Mac, so no way to know what happens when you hit 'compose key' on mac in russian phonetic layout on mac
4. just too tired, lack of energy, motivation. 

Thanks for reading.

** Affects: xkeyboard-config (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: keyboard layout phonetic russian wishlist

-- 
wishlist: adding YaZhERT and other types of russian phonetic layouts
https://bugs.launchpad.net/bugs/483142
You received this bug notification because you are a member of Ubuntu-X,
which is subscribed to xkeyboard-config in ubuntu.



Follow ups

References