Bug 2582 - xkb cyrillic layout on US and non-US keyboards (Nothern Europe)
Summary: xkb cyrillic layout on US and non-US keyboards (Nothern Europe)
Status: RESOLVED FIXED
Alias: None
Product: xkeyboard-config
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: x86 (IA32) All
: high normal
Assignee: xkb
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-20 03:53 UTC by Ivan Popov
Modified: 2005-07-18 23:05 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
a symbols file to be placed under xkb/symbols/pc/ (3.52 KB, text/plain)
2005-02-20 03:55 UTC, Ivan Popov
Details
a symbols file to be placed under xkb/symbols/pc/ (3.53 KB, text/plain)
2005-03-02 03:08 UTC, Ivan Popov
Details

Description Ivan Popov 2005-02-20 03:53:03 UTC
The existing ru and even ru(phonetic) layouts are inadequate when used on a
Swedish, or similar, keyboard. Some keys are not available in "cyrillic" mode,
some keys are not used.

I have produced a "phonetic" layout for Swedish keyboards which is the only
viable solution when you are in Sweden, use multiple computers and hence have to
use the original keyboards to write in Russian.

In contrast, "ru" layout does not work properly. Besides the ignorance of the
present extra keys and hence unnecessary abuse of other keys, it lacks the
"upper half" of the symbols provided by "se" layout, neither allows input of
occational Latin and Swedish letters.

The new layout is meant to be used like

setxkbmap -rules xorg -model pc105 -layout "se,ru_SE" -option "grp:caps_toggle"
[-variant "nodeadkeys,nodeadkeys"]

It can probably be improved (say for needs of blind-typing according to russian
typewriter layout) - but it is definitely useful as is, used by several users
for several years.
I ask for inclusion of this layout in the distribution (on common terms).
Comment 1 Ivan Popov 2005-02-20 03:55:36 UTC
Created attachment 1946 [details]
a symbols file to be placed under xkb/symbols/pc/
Comment 2 Ivan Popov 2005-03-02 03:08:27 UTC
Created attachment 2003 [details]
a symbols file to be placed under xkb/symbols/pc/
Comment 3 Ivan Popov 2005-03-20 08:28:01 UTC
ru(phonetic) layout is inconvenient even on US keyboards - it is harder to
insert latin letters and overloaded symbols like tilde into a mostly cyrillic
text. Upper case hard sign is not available at all.

I have modified the layout for more consistency and made it behave (like ru_SE)
so that right alt shifts to the "us" meaning of the key.

It does not in any way disrupt the functionality, except for a couple of keys
having been moved for consistency (e.g. uppercase and lowercase cyrillic io were
on different keys, which was confusing).

Attaching the proposed changed file.
Comment 4 Ivan Popov 2005-03-20 08:33:53 UTC
Created attachment 2165
Comment 5 Sergey V. Udaltsov 2005-07-10 11:33:27 UTC
Ivan, could you please put not the file itself but the patch? The file was
modified since the last xorg release, so we would not like to lose existing
changes. Thanks.
Comment 6 Ivan Popov 2005-07-10 12:52:59 UTC
Sergey, I assume you mean the russian-for-us layout. Now I have manually applied
changes between xorg 6.8.2 "ru" an xkeyboard-config-0.5 "ru". Attaching  a diff
between xkeyboard-config-0.5 "ru" and my "ru_US".
Note that the layout is not meant to be used with anything other that us
keyboards. If "ru" is going to be used on non-us keyboards (say if russian
keyboards get a bit different set of keys, a la german/uk/se/...), then it will
be  definitely necessary to keep "ru" and "ru_US" files apart (as well as
"ru_SE" apparently has to be a separate layout).
Comment 7 Ivan Popov 2005-07-10 12:55:21 UTC
Created attachment 3062 [details] [review]
Fix segfault (updated - missed %esi in clobber list)
Comment 8 Ivan Popov 2005-07-10 13:14:36 UTC
Created attachment 3063 [details]
Non-interactive test
Comment 9 Ivan Popov 2005-07-10 13:29:27 UTC
Again, though I submit patches, the files produced by the pathes should be
treated as quite separate entities.
ru_US may be seen as a poposal for new ru (hence the "patch"), though strictly
speaking it is not.
ru_SE does not replace anything and producing it from se is marginally useful,
the change is bigger than the original file.
Comment 10 Sergey V. Udaltsov 2005-07-12 09:15:59 UTC
Ivan, now, when I see your patches - I can say I disagree with this approach -
put ASCII symbols into 3rd and 4th shift level of Russian layout. There is no
need to do it - there is separate us layout which has to go into separate group.
xkeyboard-config is trying to make things uniform - but in your case, you
effectively "fork" American layout and put into the high shift levels. 
The idea is "one layout - one group" - and 3rd and 4th shift levels are use only
for the symbol of the SAME layout which, for some reason, cannot fit into first
two levels (if you see exceptions - please let us know, we'll consider fixing them).
Comment 11 Ivan Popov 2005-07-12 11:53:49 UTC
Sergey, it is usually harder to switch groups than levels, that's why it can be
convenient to always have access to the keys as _physically_marked_ on the
keyboard, even while using a different alphabet.
Well, if you feel inclined, just remove the extra levels or tell me to do that.
The important thing is to have layout maps for many alphabets on many types of
keyboards - which is badly lacking in X11. Ru(phonetic) is a workaround possible
because Russian and US keyboard are very similar. It has nothing to do with
Russia's keyboards, it is essentially "russian letters on US standard
keyboards". A different layout as you see is "russian letters on Swedish
standard keyboards". The extra levels you are opposed to are convenient but not
overly important.
Comment 12 Sergey V. Udaltsov 2005-07-13 07:51:55 UTC
Ivan. I see the usefulness of the phonetic layouts - you don't really need to
explain me:) The only things which I'd love to change:
1. Remove 3rd and 4th shift levels (if people have difficulties switching
groups, probably we need more options regarding group switching - but I never
seen real complaints)
2. Could you please put them as ru(phonetic) and ru(se) - as a single patch to
ru file. For example, look at the ro file - there is ro(us) and ro(de).
Thanks.
Comment 13 Ivan Popov 2005-07-16 04:10:01 UTC
Sergey, I am sorry to engage into discussion, but the situation calls for it, we
have a chance to do it better than it was.
1. What is the semantics of name(name)? Your suggestion is
<alphabet==language>(<physical-keyboard-type>) - which is not really true. The
current naming looks like <country>(<keyboard-type-variation) to accomodate for
different usage of keyboards produced for a given country. In general, country
and language are massively confused. See [4] below.
Let's make it clean instead of making more controversial steps.
2. Note that the set of characters needed by russian users while writing in
their native language is not limited to cyrillic letters. It includes both
punctuation marks and latin letters as in many cases controlling the computer
goes through latin-lettered commands. That means the layout can not be used
without combining it with a different one, which would provide latin letters. As
long as puctuation marks are included in the "russian on Russia's keyboards"
layout, we should include at least the same set of additional characters on
other types of keyboards. Hence we would need extra levels anyway.
3. As an example, the Swedish layout _can_ be used alone, without messing with
"additional layout for latin letters". Taking what you propose for Russian,
Swedish layout would include only 3 (three) letters and for the rest rely on
"latin-on-Swedish-keyboards" layout which we'd put into another group!
Apparently it is not appealing, as "se" includes all of the letters in its own
group. In contrast, Russian users are forced to use another group providing
latin letters (and abusing "us" layout that just happens to fit russian
keyboards, though without any guarantee - I do not believe US is bothered about
keeping in synch with Russia :)
4. To conclude, we should have clean semantics about what belongs to country
(physical layout and marks on the keys), what to its variations (like dvorak vs
querty) and what to language==set-of-characters-needed-for-onelingual-user.
Then you can have "norwegian-user--on--dvorak-version-of-french-keyboard". As
the symbols files are named after countries, not languages, we should then use
us(ru) for Russian users on native US keyboard, se(ru) for Russian users on
Swedish keyboard, ru(se) for Swedish users on Russian keyboards and so on,
opposite to what ro(us) and ro(de) does! Note the diference between countries
and languages, a Swedish user on Swedish keyboard would need se(sv), the first
is country (keyboard's physical look), the second swedish language.
Or you can do it inversely, but then please name the files after language, not
country (and then remove country names from the group names, it is to be
langugages!)
Comment 14 Ivan Popov 2005-07-16 04:12:36 UTC
sorry for typos
Comment 15 Sergey V. Udaltsov 2005-07-16 09:12:19 UTC
Ivan, actually, this is a very good question. 
In the docs/README.symbols file, we state that 2-letter codes really belong to
countries - so in this context 'ru' refers country, not language. So, formally,
you are right - it is a bit strange to put there your Russian layout, since it
is not used in Russia. The only reason I am proposing to put it there is so
called 'common sense'. People looking for Russian layout will look in symbols/ru
rather than in symbols/se. PROBABLY this file should be renamed to 'rus' - this
would allow to store there all the layouts related to the russian language,
regardless of the country (actually, there is already one violation inside -
Russian layout used by some Ukrainians).

Regarding the 'US' group vs shift level - the situation you describe is the case
for any non-ASCII-based layouts (Cyrillic-base, Asian, etc). In order to
function properly (for example, being able to use command line), they all need
some kind of ASCII-based layout - but none of them includes one. And we really
want to keep it that way. As an example - consider Russian people in, say,
France - quite possible they would use French layout for ASCII characters -
while keeping some variant of Russian for Cyrillic characters. Why would they
need US layout in 3rd and 4th group at all? Should we give them some kind of
ru(fr3)? So, let's leave people the freedom to choose ASCII layout which they
want. Let's give them simple way of switching the groups (if necessary,
temporarily).
Comment 16 Ivan Popov 2005-07-17 03:39:00 UTC
Sergey, people looking for Russian layout should realise what kind of keyboard
they have (or in which country they happen to reside) and look for Russian
layout for that keyboard. That is as much common sense as otherwise. If you
chose to structure information after country, not language, let's be consequent.
(layouts do not exist separately from certain keyboards, that point is largely
missing in the current arrangement of layouts, which is very confusing for a
casual user, then common sence does not help).
About latin letters and borrowing them from other layouts, it can be a working
compromise, to borrow latin letters from French layout on a French keyboard,
from Spanish layout on Spanish keyboard and so on. I am more concerned about
punctuation marks and similar. As Russian alphabet is bigger than Latin, or even
Swedish, we have to abuse some punctuation marks for cyrillic letters and it is
really convenient to have them available on an additional level. It is
cumbersome if at all possible to reach them via group shift, especially if you
want to use the same modifier (right alt) as Swedish layout already does.
To resum, I am calling for rearrangement of layouts according to the existing
directions (one file for one country-dependent physical form of keyboard),
including additional alphabets==languages support in those files as "se(ru)" for
Russian on Swedish keyboards, and "ru(sv)" for Swedish on a Russian keyboard.
Note se versus sv.
Comment 17 Ivan Popov 2005-07-17 07:36:35 UTC
Please read "se(rus)" and "ru(swe)" above, I'm used to two-letter language codes
but I didn't mean to suggest their usage. Sorry for possible confusion.
Comment 18 Sergey V. Udaltsov 2005-07-17 09:54:45 UTC
(In reply to comment #16)
> Sergey, people looking for Russian layout should realise what kind of keyboard
> they have (or in which country they happen to reside) and look for Russian
> layout for that keyboard. That is as much common sense as otherwise. If you
Why? In Russia most people used to use US layout for ASCII chars - so some of
them may continue using it in any European country, without any regard to the
actual engraving on their keyboard.

> chose to structure information after country, not language, let's be consequent.
> (layouts do not exist separately from certain keyboards, that point is largely
> missing in the current arrangement of layouts, which is very confusing for a
> casual user, then common sence does not help).
Well, that's my point - I'd say sometimes they really DO exist separately,
physical keyboards and layouts, they are not strictly bound. Most of the
keyboards I see around me have British layouts engraved. But I use Russian
(winkeys) and US - and it most probably will happen in any country I'll ever
visit, regardless. So we cannot enforce neither this nor that way - we just can
assume that some people will use US layout, some people will use some other
ASCII layout, country-based - but actually not always _current_ country-based -
imagine some Russian who works in France, used to French layout - but send in a
business trip to Germany for a couple of weeks - he will use German keyboard
(along with Russian) but probably will setup French layout for ASCII chars.

> really convenient to have them available on an additional level. It is
Well, that's separate point. If we take ASCII characters out and just want to
add more punctiation to the Russian layout (on 3th and 4th shift levels) -
that'd probably make sense. The only thing is that I don't really see which ones
you are going to add - to which layout. Could you please give me the list of
missing chars you are going to add - and where would you put them? If it just
1-2 chars, probably the effort of adding one more shift level is not worth the
trouble...

> To resum, I am calling for rearrangement of layouts according to the existing
> directions (one file for one country-dependent physical form of keyboard),
What would you do with the small countries which simply don't have their native
keyboard (for example, I never seen Irish keyboard - but some Irish layouts do
exist in the codebase)?

What may happen is 'ru' may become 'rus' - so it would be responsible for all
Russian-language-oriented layouts (even in other countries). So it could be
correct to have rus(se). Currently this issue is under discussion in
xkb@listserv.bat.ru
Comment 19 Ivan Popov 2005-07-18 05:22:26 UTC
> In Russia most people used to use US layout for ASCII chars - so some of
> them may continue using it in any European country, without any regard to the
> actual engraving on their keyboard.

Only if they are mostly blind-typing! That is not the case for most people I know.

> > (layouts do not exist separately from certain keyboards
> Well, that's my point - I'd say sometimes they really DO exist separately,
> physical keyboards and layouts, they are not strictly bound. Most of the
> keyboards I see around me have British layouts engraved. But I use Russian
> (winkeys) and US

I guess that given an existing rus-on-uk layout you would be fine using it.
Of course unless you are exclusively blindtyping.

> some Russian who works in France, used to French layout - but send in a
> business trip to Germany for a couple of weeks - he will use German keyboard
> (along with Russian) but probably will setup French layout for ASCII chars.

A light differences like two keys swapped can fall in that cathegory, but in
general non-heavy typists use the labels on the keys.

> Could you please give me the list of
> missing chars you are going to add - and where would you put them? If it just
> 1-2 chars, probably the effort of adding one more shift level is not worth the
> trouble...

Let me give you a next patch as my best approximation to a possible "compromise"
and do whatever you please with that. I feel I do not have resources to continue
the discussion, as I am commited to other projects.

I am very frustrated with X11 layouts being - sorry - a mess without a clean
structure. The things I propose do not in any way contradict your personal usage
and needs. On the other side, current structure, ignoring dependency of a layout
on a physical keyboard look is very bad for many users.
I feel I have done all I can to convince you (and thanks for listening!) but I
can not do more. I am totally independent personally on what X.org does in that
matter, otherwise I'd probably invest more time in xkeyboard-config project.

> What would you do with the small countries which simply don't have their native
> keyboard (for example, I never seen Irish keyboard - but some Irish layouts do
> exist in the codebase)?

They are apparently using other countries' keyboard models, so possibly uk(mga)
and uk(sga)? You see, it is no problem to find the place in the matrix, given a
language and a keyboard labeling (which is in general what is called country).

With other words, Irish speakers do not need a "country" file, why would them?

It seems you are unconsciously assuming things ("we need a country file for this
country's people") which are not true, it is just the way you interpret the
existence of the "country" files.

The "language" files can represent the same matrix from another direction, but
you should never forget that that _is_ a matrix. You can not define an alphabet
layout which would be meaningful on all kinds of keyboards, it _is_ to some
(big) degree bound to labels on the keys.

> What may happen is 'ru' may become 'rus' - so it would be responsible for all
> Russian-language-oriented layouts (even in other countries). So it could be
> correct to have rus(se). Currently this issue is under discussion in
> xkb@listserv.bat.ru

It does not matter which dimension is represented as file names, and which as
sections in the files - but it is a mess having "both representations" without a
reason and apparently without the clean understanding. I do not mean you
personally, I mean the historical contributions to layouts. Hope the discussion
you mention will help to raise the level of consciousness about the underlying
logic, incompatibly understood by different contributors.

I hope some day X11-keyboards will be rich, clean and understandable. Today, no
consequent documentation exists and the "common sence" practice has lead to a
self-contradicting jungle (as the sence evidently is not common? :)

Again, Sergey, thanks for your time and patience talking to me, and good luck
with the project!
Comment 20 Ivan Popov 2005-07-18 07:26:09 UTC
Created attachment 3100 [details] [review]
Patch to use rint() in xcursorgen

I am following the model "one file per one keyboard look aka country", sections
being used to deal with different alphabets. This description replaces the old
wrongly placed "ru(phonetic)".
Comment 21 Ivan Popov 2005-07-18 07:34:35 UTC
Created attachment 3101 [details] [review]
Patch to update libGLw's Motif headers

I am following the model "one file per one keyboard look aka country", sections

being used to deal with different alphabets. This description implements a
missing layout not present in the old "ru(phonetic)" obsoleted by us(rus).
Comment 22 Sergey V. Udaltsov 2005-07-18 10:10:29 UTC
> Only if they are mostly blind-typing! That is not the case for most people I know.
Exactly! You got my point! There are loads of blind-typing people in the
corporate world - so for them all this engraving is nothing.

> I guess that given an existing rus-on-uk layout you would be fine using it.
Never heard of a person who would do it. Local Russians, as I could see - either
type Russian blindly - or bring stickers from Russia - and put them in some
traditional normal Russian way.

> A light differences like two keys swapped can fall in that cathegory, but in
> general non-heavy typists use the labels on the keys.
Agree.

> Let me give you a next patch as my best approximation to a possible "compromise"
> and do whatever you please with that. I feel I do not have resources to continue
> the discussion, as I am commited to other projects.
I see. Anyway, big thanks to you for raising this question. It is worth
consideration any way. The fact that we arbitrary use country-based and
language-based layouts is really somewhat bothering - so probably we'll think
about it more.

> and needs. On the other side, current structure, ignoring dependency of a layout
> on a physical keyboard look is very bad for many users.
I cannot completely disagree with this point. The most serious objection I can
show - this rule cannot be applied universally (because of the countries which
don't have their own physical keyboards).

> matter, otherwise I'd probably invest more time in xkeyboard-config project.
You are always welcome in our project - and we always open to the discussions in
our maillist.

> They are apparently using other countries' keyboard models, so possibly uk(mga)
> and uk(sga)? You see, it is no problem to find the place in the matrix, given 
a
NOO!!! THIS IS POLITICALLY INCORRECT! A lot of Irish people would be frustrated
(especially the ones who really want to type in Irish, not English) to see their
layout as a variant of the UK layout. Just think about Ukranians whish have to
find all their layouts inside 'ru'? Political nightmare, that's what you'd get
(actually, it is not the first time we find political issues involved).
 
> With other words, Irish speakers do not need a "country" file, why would them?
Well, the Irish country file, if you have a look, includes layouts for the
country two official languages - English and Gaelic. Actually, they refer some
'hardware' - but I NEVER (in 5 years) seen any keyboard different from the
British ones (beside the ones brought from US, Germany etc).

> It seems you are unconsciously assuming things ("we need a country file for this
> country's people") which are not true, it is just the way you interpret the
> existence of the "country" files.
You are kind of right in this aspect - the choice between the country and
language was never formalized. And most probably it needs to be. I am just
telling you - we cannot afford insulting countries by putting their layouts in
their big neighbours' ones.

> layout which would be meaningful on all kinds of keyboards, it _is_ to some
> (big) degree bound to labels on the keys.
Agree. Just reminding you - these labels are not necessarily engraved physically
(like for dvorak layouts which appeared way before the first dvorak keyboard was
produced).

> It does not matter which dimension is represented as file names, and which as
> sections in the files - but it is a mess having "both representations" without a
> reason and apparently without the clean understanding. I do not mean you
Again, I agree. And I think we should address this issue. Really big thanks.

> Again, Sergey, thanks for your time and patience talking to me, and good luck
> with the project!
Thank you. And thanks again for raising the tough questions. Sure I'd appreciate
if you subscribe our maillist and participate in our discussions when you find
them interesting for you.

Regarding the patches - I'll have a look at them and will try to accomodate at
least in the current 'messy' scheme.
Comment 23 Ivan Popov 2005-07-18 10:59:33 UTC
I was not going to add anything more, but can not hold myself from commenting.

> type Russian blindly - or bring stickers from Russia - and put them in some
> traditional normal Russian way.

At least partly because they had no other option. And there is people (myself
included) who do not type blindly in Russian and who can not relabel keyboards 
for different reasons (in my case, I am using too numerous computers).
Perhaps you might more easily see the problem if you'd use a North European
keyboard? It differs from US more than UK one does.

> NOO!!! THIS IS POLITICALLY INCORRECT! A lot of Irish people would be frustrated

Then you make a copy of a file corresponding to the same hardware and call it by
politically correct two letters. It is not a problem, nor does it contradict the
structuring - it just reflects the fact that they have or pretend to have the
country-specific hardware. Hardware features common for several countries are
already supported by current descriptions, like North European layouts do.

> if you subscribe our maillist and participate in our discussions when you find
> them interesting for you.

Unfortunately I can not afford that, I have to do other exciting and urgent
things which consume my whole time. I am glad I've got the chance to explain
myself to somebody involved into decision making.

Thanks and good luck Sergey!
Comment 24 Sergey V. Udaltsov 2005-07-19 08:42:29 UTC
> I was not going to add anything more, but can not hold myself from commenting.
Good for me!:)

> Perhaps you might more easily see the problem if you'd use a North European
> keyboard? It differs from US more than UK one does.
I see your point anyway - despite the fact I am using both US and ru(winkeys)
blindly:)

> Then you make a copy of a file corresponding to the same hardware and call it by
> politically correct two letters. It is not a problem, nor does it contradict the
> structuring - it just reflects the fact that they have or pretend to have the
> country-specific hardware. Hardware features common for several countries are
> already supported by current descriptions, like North European layouts do.
Yes, that's true. We'll think of it again.

> Unfortunately I can not afford that, I have to do other exciting and urgent
> things which consume my whole time. I am glad I've got the chance to explain
> myself to somebody involved into decision making.
Sure it's up to you. You just should know you are always welcome:)

Thanks again for your questions and your opinion.
Comment 25 Sergey V. Udaltsov 2005-07-20 09:05:00 UTC
Layouts are committed to CVS, but without 3rd and 4th groups - since these
variants are meant to be complimentary to the normal US ones. I will think about
punctuation a bit more...


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.