wishlist: adding YaZhERT and other types of russian phonetic layouts

Bug #483142 reported by decora on 2009-11-15
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xkeyboard-config (Ubuntu)
Wishlist
Unassigned

Bug Description

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.

Bryce Harrington (bryce) on 2010-03-18
tags: added: jaunty
Erlan Sergaziev (sergeant) wrote :

I would also like to have Mac style Russian phonetic.
At least student.

I can help by testing.

Currently reading xkb documentation and maybe can start coding myself at some point.

Victor Vargas (kamus) wrote :

@decora, sorry for late reply but have you checked if this function is implemented under latest release of Ubuntu Lucid? Thanks in advance!

Changed in xkeyboard-config (Ubuntu):
importance: Undecided → Wishlist
status: New → Incomplete
Erlan Sergaziev (sergeant) wrote :

I have since switched to Phonetic Winkeys and got used to it, so not affecting me any more.

Victor Vargas (kamus) wrote :

Thanks for your reply, according to your last message I will close this report then but if you encounter this requirement is not implemented under latest Ubuntu release or if you can attach a patch for this report please reopened again. Thanks in advance

Changed in xkeyboard-config (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers