Bug 37237 - Add a "us" variant of German layouts (patch included)
Summary: Add a "us" variant of German layouts (patch included)
Status: RESOLVED FIXED
Alias: None
Product: xkeyboard-config
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: xkb
QA Contact:
URL:
Whiteboard:
Keywords:
: 37463 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-05-15 14:01 UTC by Sebastian Dörner
Modified: 2012-05-04 15:39 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Patch for adding the keyboard layout variant (1.30 KB, patch)
2011-05-15 14:01 UTC, Sebastian Dörner
Details | Splinter Review
Patch for adding the keyboard layout variant (v2) (1.65 KB, patch)
2011-05-23 13:07 UTC, Sebastian Dörner
Details | Splinter Review
Patch for adding the keyboard layout variant (v3) (2.03 KB, patch)
2011-05-23 14:36 UTC, Sebastian Dörner
Details | Splinter Review

Description Sebastian Dörner 2011-05-15 14:01:10 UTC
Created attachment 46748 [details] [review]
Patch for adding the keyboard layout variant

Many German users prefer the US keyboard layout for a better linux and programming experience, but they usually still want to be able to use German umlauts and "ß" as well as the Euro sign. I therefore propose to add a keyboard variant putting those special chars on the AltGr-combination of the keys where the Umlauts are present on the German layout.

The patch for this proposal is appended or available as a git clone at:
https://github.com/sdoerner/xkeyboard-config

I tried to follow the guidelines at http://www.freedesktop.org/wiki/Software/XKeyboardConfig/Rules
Please let me know if any changes are necessary to get it accepted.

Thank you.
Comment 1 Sergey V. Udaltsov 2011-05-15 14:04:29 UTC
1. What's so bad about us(intl)? It has all the necessary stuff.
2. Would you be able to estimate the current number of users of your variant?
Comment 2 Sebastian Dörner 2011-05-15 14:42:47 UTC
1. US(intl) replaces e.g. "o with ö. This is quite unfortunate, because you actually need that combination when quoting someone or when coding latex. Furthermore it is harder to type than the AltGr-combination. Otoh the current output of AltGr-o is ¶, which is certainly less useful than the umlaut.

2. In short: no.
 The "many users" of my original statement related to users of English keyboard layouts who still want to use German letters, not to my layout.
I have been applying this patch manually up to now. As there doesn't seem to be an easier way to integrate own layouts (correct me if I'm wrong here), I guess not many people do that.
Searching for a permanent solution, I found this (German) thread, where other users prefer the AltGr combinations:
http://groups.google.com/group/de.comp.os.unix.x11/browse_thread/thread/58024d430eac0660/610dc4630003c824
However, I do not have any numbers.
Comment 3 Sebastian Dörner 2011-05-15 14:48:18 UTC
Sry for double-post, but I just found the original tutorial I used to do that (must have been several years ago):

http://foertsch.name/Artikel/XKB2/index.shtml#umlaut

Unfortunately also in German, but as this straightforward tutorial is available, there will probably be more people using this layout.
Comment 4 Sergey V. Udaltsov 2011-05-16 14:59:15 UTC
> 1. US(intl) replaces e.g. "o with ö. This is quite unfortunate, because you
> actually need that combination when quoting someone or when coding latex.
> Furthermore it is harder to type than the AltGr-combination. Otoh the current
> output of AltGr-o is ¶, which is certainly less useful than the umlaut.
Wait, I do not understand. I see  that for "o" the defintion is
key <AD09> { [         o,          O,        oacute,           Oacute ] };
I guess you are getting 'o' with umlaut because of the Compose. What if you disable Compose key (or put it, say,  on CAPSLOCK - see compose:caps xkb option). Would that make us(intl) more usable?

I am asking because I am trying not to put the layouts that would have similar targets and very similar.

 > 2. In short: no.
>  The "many users" of my original statement related to users of English keyboard
> layouts who still want to use German letters, not to my layout.
Ok, so what do they do today?

> I have been applying this patch manually up to now. As there doesn't seem to be
> an easier way to integrate own layouts (correct me if I'm wrong here), I guess
> not many people do that.
Yes, that is right, no easy way.

> Searching for a permanent solution, I found this (German) thread, where other
> users prefer the AltGr combinations:
Where do they take them from, today? Are they using your variant (sorry, I do not read German)
Comment 5 Sebastian Dörner 2011-05-17 14:31:13 UTC
(In reply to comment #4)
> > 1. US(intl) replaces e.g. "o with ö. This is quite unfortunate, because you
> > actually need that combination when quoting someone or when coding latex.
> > Furthermore it is harder to type than the AltGr-combination. Otoh the current
> > output of AltGr-o is ¶, which is certainly less useful than the umlaut.
> Wait, I do not understand. I see  that for "o" the defintion is
> key <AD09> { [         o,          O,        oacute,           Oacute ] };
> I guess you are getting 'o' with umlaut because of the Compose. What if you
> disable Compose key (or put it, say,  on CAPSLOCK - see compose:caps xkb
> option). Would that make us(intl) more usable?

Several aspects here:
1) In German layout, the keys 'ö', 'ä' and 'ü' are physically on ';', '"' and ']'. My patch makes puts the umlauts on these spots again, if you press AltGr. In contrast the line you cite above puts it on 'o', 'a' and 'u' with AltGr, which is obviously different, imho not as good (since it's a German variant, the Umlauts should be on their position on the German keyboard), but would also be a workable solution for me.
2) oacute and Oacute are NOT the umlauts. They add French accents above the letters, which is not the right thing :) The umlauts are odiaeresis, Odiaeresis and the like (see my patch).
3) Due to 2, your solution with disabling the compose key would enable me to write '"a' again, but I still couldn't type umlauts.

> 
> I am asking because I am trying not to put the layouts that would have similar
> targets and very similar.
> 
>  > 2. In short: no.
> >  The "many users" of my original statement related to users of English keyboard
> > layouts who still want to use German letters, not to my layout.
> Ok, so what do they do today?
Hehe. I still haven't made myself clear enough. It was merely the observation for the general need than having actually asked lots of people. Every German has to type Umlauts somewhen. And I know several people using US keyboard for obvious reasons. As I am in the UK atm, I'll try to contact them remotely and ask what they do.

> 
> > I have been applying this patch manually up to now. As there doesn't seem to be
> > an easier way to integrate own layouts (correct me if I'm wrong here), I guess
> > not many people do that.
> Yes, that is right, no easy way.
> 
> > Searching for a permanent solution, I found this (German) thread, where other
> > users prefer the AltGr combinations:
> Where do they take them from, today? Are they using your variant (sorry, I do
> not read German)
Sorry, I am not entirely familiar with how one can do these things and what are legacy systems. One post refers to (the English Tutorial)
http://www.in-ulm.de/~mascheck/X11/input8bit.html#altgr 
which uses something like 
xmodmap -e 'keycode 84 = a A adiaeresis Adiaeresis'.
To me this looks like the hardcoded variant of my patch. In any case, this is no predefined layout, but also a custom solution, i.e. English intl. obviously didn't work for the user. Another user states that he does "something similar" and explicitly mentions that us_intl is not workable for him due to the reasons I explained.
Comment 6 Sebastian Dörner 2011-05-17 14:42:44 UTC
One of the people I asked just answered. He switches to the German keyboard when he needs umlauts. As I just discovered, when and how to switch the layout is much more flexible these days than it used to be. E.g. there is also the "hold AltGr to switch" possibility.

For me personally, this is a viable option. I just don't know if it is part of Xorg or only available for a subset of your users. If the former is true, I guess this solutions would also render many of the existing variants named "us" obsolete, which were advertised as a naming convention on http://www.freedesktop.org/wiki/Software/XKeyboardConfig/Rules:
"'us' - for variants which are using standard American layout as a basis, adding some national characters"

--> In practice, this problem is solved for me (feel free to close the bug if the above mentioned solution works for all users). However, I'm open for further discussions about the problem or whether "us" variants for languages should remain part of the standard layouts. :) Thanks.
Comment 7 Anton Zinoviev 2011-05-18 05:19:35 UTC
> Would you be able to estimate the current number of users of your variant?

Well, I this is a new layout so I suppose the current number of users is close to 0.  However, I know positively that quite a few people in Western Europe (not only in Germany but also in France, Netherlands and in many other countries) use the standard 'us' layout even if this layout doesn't provide the national characters with diacritics. There are two groups of users of the 'us' layout in Western Europe. First, the programmers. This is because it is very awkward to type some ASCII characters on the national keyboards. The second group of users of the 'us' layout are the system administrators.

Personally, I think it will be good to include a 'us' variant for most western European layouts even if it is plain 'us' or 'us(intl)'. And of course, it will be preferable to use language-specific layouts (such as the currently proposed layout by Sebastian Dörner) than the generic 'us' or 'us(intl)' as long as there are no differences with the standard 'us' layout in the first and the second levels.

Just one additional note (speaking as maintainer of console-setup). All Debian/Ubuntu based Linux/FreeBSD distributions use xkeyboard-config not only in X, but also in the text console. This increases the the number of the users of the second category (the system administrators) that will benefit from the 'us' variants. For example when an user in France installs Debian, (s)he will see first the list of the variants in X11/xkb/symbols/fr. Currently the user has to decline these layouts in order to select US and only then the basic US variant. This is not very user-friendly. It would be better include a 'us' variant among the variants in X11/xkb/symbols/fr as it is certainly more popular than most variants in this file.
Comment 8 Sergey V. Udaltsov 2011-05-22 05:24:28 UTC
*** Bug 37463 has been marked as a duplicate of this bug. ***
Comment 9 Sergey V. Udaltsov 2011-05-22 05:25:12 UTC
There is similar solution in #37463

Lads, could you please come up with single approach?
Comment 10 Stephan Otto 2011-05-22 22:30:06 UTC
(In reply to comment #9)
> There is similar solution in #37463
> 
> Lads, could you please come up with single approach?

I don't belief that we are meaning the same thing. First of all, what I mean is "layout for US keyboards used by German speakers". Please clarify, is this us(de) or de(us)? Secondly, what Sebastian wants is to put the German characters on the keys where they would be on the German keyboard. This is a good solution for users who are familiar with the German keyboard, but a bad one for users (like me) who never use it. What I want is therefore to bind those characters to a key that has a matching label: ä is a variant of a, so I want to get it with AltGr+a. This doesn't require any prior knowledge and works well for anyone who doesn't memorize the German keyboard (or puts sticky notes on their keys), but occasionally needs to type German characters. Like Sebastian, I don't know how many people are using this solution, but I don't want to maintain it indefinitely as a local patch. All I know is that I'm not the only one. So whichever variant you accept decides who will be able to use it. You be the judge.
Comment 11 Stephan Otto 2011-05-22 22:57:29 UTC
(In reply to comment #10)
> (In reply to comment #9)
> > There is similar solution in #37463
> > 
> > Lads, could you please come up with single approach?
> 
> I don't belief that we are meaning the same thing. First of all, what I mean is
> "layout for US keyboards used by German speakers". Please clarify, is this
> us(de) or de(us)? Secondly, what Sebastian wants is to put the German
> characters on the keys where they would be on the German keyboard. This is a
> good solution for users who are familiar with the German keyboard, but a bad
> one for users (like me) who never use it. What I want is therefore to bind
> those characters to a key that has a matching label: ä is a variant of a, so I
> want to get it with AltGr+a. This doesn't require any prior knowledge and works
> well for anyone who doesn't memorize the German keyboard (or puts sticky notes
> on their keys), but occasionally needs to type German characters. Like
> Sebastian, I don't know how many people are using this solution, but I don't
> want to maintain it indefinitely as a local patch. All I know is that I'm not
> the only one. So whichever variant you accept decides who will be able to use
> it. You be the judge.

Hey, it just occured to me that they are not exclusive! If we merge both patches into one layout, it should work for everyone. Not the most elegant solution, but acceptable, since AltGr isn't really used for anything on the US keyboard but European characters.
Comment 12 Sergey V. Udaltsov 2011-05-23 00:04:33 UTC
> Hey, it just occured to me that they are not exclusive! If we merge both
> patches into one layout, it should work for everyone. Not the most elegant
> solution, but acceptable, since AltGr isn't really used for anything on the US
> keyboard but European characters.
Yes, that's exactly what I mean. Please merge.
Comment 13 Sebastian Dörner 2011-05-23 13:07:40 UTC
Created attachment 47069 [details] [review]
Patch for adding the keyboard layout variant (v2) 

I merged the two layouts and also added "section" to AltGr + its location on the German layout, because it is not present at all on US keyboards.
Now, the umlauts and ß are accessible at their positions on the German keyboard and the position of their "sensible transcription of normal letters" on US keyboard, each only with AltGr pressed.

Hope that satisfies everyone's needs.
Comment 14 Sergey V. Udaltsov 2011-05-23 13:46:37 UTC
I am almost ok with that patch. Except that I would prefer to see it in base.extras.xml.in.
Comment 15 Sebastian Dörner 2011-05-23 14:36:27 UTC
Created attachment 47075 [details] [review]
Patch for adding the keyboard layout variant (v3) 

Changed as requested.
Comment 16 Anton Zinoviev 2011-05-24 04:57:08 UTC
> I am almost ok with that patch. Except that I would prefer to see it
> in base.extras.xml.in.
Well, I bet the us layout in Germany is more popular than half of the layouts in symbols/de...

BTW, isn't it possible to merge de(us) and de(qwerty)?
Comment 17 Stephan Otto 2011-05-27 20:24:26 UTC
(In reply to comment #16)
> > I am almost ok with that patch. Except that I would prefer to see it
> > in base.extras.xml.in.
> Well, I bet the us layout in Germany is more popular than half of the layouts
> in symbols/de...
> 
> BTW, isn't it possible to merge de(us) and de(qwerty)?

I agree that it is one of the more popular layouts, although the specs say that "layouts for programmers" are to be considered exotic. Not sure if I can follow the logic here...

BTW, I still don't fully understand the definition of de(us) and us(de). I'm a German speaker working in US on a US device with a US keyboard. Where do I belong?
Comment 18 Sebastian Dörner 2011-05-28 06:39:38 UTC
About the merge with de(qwerty): Afaik de(qwerty) is like the normal German keyboard, only y and z are exchanged. While I don't know why one would use it (after all foreigners will mostly have problems with special chars, not y and z), it is quite different from the new layout.
About de(us) and us(de):
http://www.freedesktop.org/wiki/Software/XKeyboardConfig/Rules
proposes a 'us' variant "for variants which are using standard American layout as a basis, adding some national characters". That's why I figured the layout would fit there best. Also, the us layout would be quite full if it contained variants for all countries - just  my 2 cents.

Apart from that: Is there anything left blocking the acceptance of the patch?
Comment 19 Sergey V. Udaltsov 2011-06-01 13:26:56 UTC
It is committed now (sorry, there was a pre-release freeze).
Thank you! I just removed the AltGr from description - because it is level3, some people might prefer other modifiers for accessing it. Hope it is ok with you.

Thank you again!

Speaking about de(qwerty) - would it make sense to remove it altogether, what's your opinion. From your explanation, that variant does not make much sense...
Comment 20 Sebastian Dörner 2011-06-02 16:14:36 UTC
(In reply to comment #19)
> It is committed now (sorry, there was a pre-release freeze).
> Thank you! I just removed the AltGr from description - because it is level3,
> some people might prefer other modifiers for accessing it. Hope it is ok with
> you.
> 
> Thank you again!
> 
> Speaking about de(qwerty) - would it make sense to remove it altogether, what's
> your opinion. From your explanation, that variant does not make much sense...

Great, thank you! I don't care for the exact name.
About qwerty:
I looked at the layout and it actually does what I said - only switches y and z. While I don't find that useful, I don't know about the weird thoughts of other people. There must be some reason it was added in the first place. I'd research that point and include the findings into your further decisions.
Comment 21 js 2012-05-02 05:28:24 UTC
(In reply to comment #20)
> About qwerty:
> I looked at the layout and it actually does what I said - only switches y and
> z. While I don't find that useful, I don't know about the weird thoughts of
> other people. There must be some reason it was added in the first place. I'd
> research that point and include the findings into your further decisions.

Here is one guy with "weired thoughts". I really love qwerty and use it all the time (even created my own keymap for the few cases I have have to use windows).

The reason is very simple:
I need a German layout since I am typing a lot of German all day long. But at the same time every and each software uses the default shortcuts. Especially "Ctrl-Z" for undo.
Pressing Ctrl-Z with a German layout with just the left hand is difficult. Since I am using an ergonomic keyboard, it is nearly impossible for me...


de(us) or us(de) and de (qwerty) address to completely different things:
The first layout is made for programmers that just need the German umlauts a few times a day.
The later is made for people typing a lot of German (and therefore prefering the German layout) but still want to be able to use the most important shortcut with one hand...


So please readd "de (qwerty)" if possible...
Comment 22 Sergey V. Udaltsov 2012-05-04 15:39:30 UTC
ok


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.