Right CTRL don't work

Bug #198759 reported by Patrice Vetsel
64
This bug affects 5 people
Affects Status Importance Assigned to Milestone
xkeyboard-config (Ubuntu)
Fix Released
Medium
Colin Watson
Hardy
Fix Released
Medium
Colin Watson

Bug Description

Binary package hint: xkeyboard-config

1/ Do a fresh and french Hardy desktop-live (pre Alpha6) installation.
2/ Open shortcuts management
3/ assign ejection of cd to Right CTRL + Alt + P
-> shotcut don't work

OR

Install and use virtualbox (that use Right CTRL), and once virtualbox have keyboard and mouse focus try to exit VM with the Right CTRL ;)

OR

boot in recovery mode -> root shell -> Right CTRL+C don't work

Changed in xkeyboard-config:
importance: Undecided → Medium
Revision history for this message
Jonathan Marsaud (zic) wrote :

Same here. Switch to Confirmed Status.

Changed in xkeyboard-config:
status: New → Confirmed
Revision history for this message
Patrice Vetsel (vetsel-patrice) wrote :

After investigations :
reboot in recovery mode, in root shell :
Right CTRL+C don't work here too.

showkey show :
0x1d 0xe1 for right ctrl, so kernel is working as expected, don't know where the problem come from…

Revision history for this message
Patrice Vetsel (vetsel-patrice) wrote :

Under Hardy live, gnome-terminal Right CTRL+C is working
Not under gnome-terminal on Hardy installed

Under Gutsy recovery root shell, Right CTRL+C is working
Under Hardy recovery root shell, Right CTRL+C is NOT working

Revision history for this message
Colin Watson (cjwatson) wrote :

Could you post /etc/default/console-setup and /etc/X11/xorg.conf, please?

Changed in xkeyboard-config:
status: Confirmed → Incomplete
Revision history for this message
Patrice Vetsel (vetsel-patrice) wrote :

/etc/default/console-setup

Revision history for this message
Patrice Vetsel (vetsel-patrice) wrote :

/etc/X11/xorg.conf after nvidia restricted driver

Revision history for this message
Patrice Vetsel (vetsel-patrice) wrote :

/etc/X11/xorg.conf after installation

Changed in xkeyboard-config:
status: Incomplete → Confirmed
description: updated
Revision history for this message
Christophe Fergeau (teuf-gnome) wrote :

Same issue here (French keymap). The right ctrl key generates events in xev, though the name of the key is surprising when compared to what is returned for the left ctrl key and compared to what was returned for the right ctrl key under gutsy

right ctrl pressed (hardy):

KeyPress event, serial 30, synthetic NO, window 0x3a00001,
    root 0x56, subw 0x0, time 72133229, (122,73), root:(1219,861),
    state 0x10, keycode 109 (keysym 0xfe11, ISO_Level5_Shift), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

left ctrl pressed (hardy):

KeyPress event, serial 30, synthetic NO, window 0x3a00001,
    root 0x56, subw 0x0, time 72169959, (42,102), root:(1139,890),
    state 0x10, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

right ctrl pressed (gutsy):
same as what is returned for hardy except for :
    state 0x10, keycode 109 (keysym 0xfe4, Control_R), same_screen YES,

Hope that helps

Revision history for this message
Jim Braux-Zin (j-brauxzin) wrote :

I have exactly the same problem with a French keymap with a generic 105 keys layout on a Lenovo 3000 N200 laptop.

xev gives the same output as for Christophe Fergeau.

The gnome keybindings dialog detects the right Ctrl as "Mod3".

Hope you can fix this bug in time, it seems to affect only French keyboard so far.

Changed in xkeyboard-config:
milestone: none → ubuntu-8.04
Revision history for this message
Colin Watson (cjwatson) wrote :

Right Control is deliberately mapped to ISO_Level5_Shift in the fr(oss) keymap, which I think is just for the benefit of the narrow non-breaking space key. I'll contact the author of this keymap and ask if this can safely be changed.

Revision history for this message
Colin Watson (cjwatson) wrote : Right Control level-5 mapping in fr(oss) causing confusion

Hi Nicolas,

A while back, Ubuntu switched over to using your fr(oss) XKB variant for
French users by default. Since then, we've had a certain amount of
confusion regarding how the right Control key is mapped:

  https://bugs.launchpad.net/ubuntu/+source/xkeyboard-config/+bug/198759
  https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/208224

symbols/oss has:

    include "level5(rctrl_switch)"

This seems to be for the benefit of exactly one key, the narrow
non-breaking space. Is this really worth it, since it seems to be
causing confusion? Would it be reasonable for us to drop this mapping
and let the right Control key act the same way as the left?

Thanks,

--
Colin Watson [<email address hidden>]

Revision history for this message
Steve Langasek (vorlon) wrote : Re: [Bug 198759] Right Control level-5 mapping in fr(oss) causing confusion

On Fri, Apr 04, 2008 at 12:22:44PM -0000, Colin Watson wrote:
> This seems to be for the benefit of exactly one key, the narrow
> non-breaking space. Is this really worth it, since it seems to be
> causing confusion? Would it be reasonable for us to drop this mapping
> and let the right Control key act the same way as the left?

The narrow non-breaking space is certainly important for French orthography,
but it doesn't seem like a good idea to dedicate an entire modifier key to
it...

--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
<email address hidden> <email address hidden>

Revision history for this message
Franck (alci) wrote :

Well, sure it is !

narrow non-breaking space is called "espace fine" and is supposed to be used between a word and a ? or ! in place or an stupid standard non breaking space.
Who would live without it ?

On the other hand, right ctrl is used to escape from a virtualbox window once it has captured the mouse. Or is an easier way for ctrl+P to print something when your left hand is smaller than 10 inches. Not bad either.

Seriously, this behaviour must be a typo, it can't be on purpose !

Revision history for this message
Colin Watson (cjwatson) wrote :

Franck, please don't rant in bug reports - it really doesn't help. You have two core developers paying attention to this bug right now, and it is already on our list to be fixed for 8.04. My experience is that bugs filled with ranting are less pleasant to spend time on and thus if anything are less likely to be fixed, so please be nice.

I got a reply from the upstream author, saying:

"If you want to fix this please define a new type in
/usr/share/X11/xkb/types/extra

that does the same thing as the current type used for the space key with
right-ctrl hardcoded instead of using iso_level5, then switch the space
key in fr(oss) to this type.

You have my blessing to merge the result as default in upstream
xkeyboard-config."

I think I get the idea of this, and will figure out an implementation shortly.

Revision history for this message
Steve Langasek (vorlon) wrote : Re: [Bug 198759] Re: Right CTRL don't work

On Sat, Apr 05, 2008 at 10:01:08PM -0000, Colin Watson wrote:
> "If you want to fix this please define a new type in
> /usr/share/X11/xkb/types/extra

> that does the same thing as the current type used for the space key with
> right-ctrl hardcoded instead of using iso_level5, then switch the space
> key in fr(oss) to this type.

> You have my blessing to merge the result as default in upstream
> xkeyboard-config."

> I think I get the idea of this, and will figure out an implementation
> shortly.

One thing that's not clear to me is why fr(oss) uses nbsp(level4n) instead
of simply using nbsp(level3). There's a comment in
/etc/X11/xkb/symbols/nbsp that:

 // This is good for typographers but experience shows many users accidently
 // type no-breaking spaces on the CLI (resulting in errors)

But I don't understand why this would be the case - how do you hit
AltGr+Space accidentally?

I don't use a French keymap so my opinion doesn't count for much, but it
does seem very strange to me that there would be a need to bind this to
RCTRL at all instead of using AltGr.

--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
<email address hidden> <email address hidden>

Revision history for this message
Fabien Tassin (fta) wrote :

> But I don't understand why this would be the case - how do you hit
> AltGr+Space accidentally?

to obtain a "|" on a french keyboard, you have to do <AltGr> + <-> (the key holding the 6 on a US keyboard, above the <y>).
So, in CLI, when *I* type "foo | bar", most of the time, the space after the pipe is in fact <AltGr> + <Space>, so it is turned into an unwanted nbsp.

I'm not a typographer so I prefer to set "Space key outputs usual space at any levels" in Keyboard Layout Options.
It works fine in X but unfortunately not in console/tty.

At the very least, if reverting that Right CTRL mapping is not wanted, will it be possible to have a knob in the Keyboard Layout Options panel to restore Right CTRL = Left CTRL ?

Revision history for this message
Patrice Vetsel (vetsel-patrice) wrote :

Fabien : indeed. It's exactly the problem why AltGr is not used. :)

"that does the same thing as the current type used for the space key with
right-ctrl hardcoded instead of using iso_level5, then switch the space
key in fr(oss) to this type."

I don't know if it's a bug or not, but upstream author tell me that xkb should take care of level5 for right ctrl ONLY on key that have level5 (space here), the preoblem is that right ctrl level5 is used everytime.

As already said we should hardcode level5 in space key.

Colin Watson (cjwatson)
Changed in xkeyboard-config:
assignee: nobody → kamion
Revision history for this message
Fabien Tassin (fta) wrote :

What is puzzling me here is that on my desktop, I see Control_R while on my laptop, I see ISO_Level5_Shift.
It means I can use <Control><PrintScreen> or bind stuff like <Control><F12> and <Control><Left/Right> in metacity and have those work with Control_R on my desktop while on my laptop it doesn't work.

Both are using the "France" layout. I don't understand why they act differently.
The only difference is "Keyboard Model".

Revision history for this message
Frédéric Nass (nass) wrote :

I just upgrade to latest available kernels and packages but the "bug" is still there..

Could some of you guys give a bit more infos on how to fix this ?

I couldn't get how to "define a new type in /usr/share/X11/xkb/types/extra"... :-s

Thanks for any precious help you might provide here...

Revision history for this message
Franck (alci) wrote :

@Frédéric
as a temporary workaround, you can simply comment out the following line

include "level5(rctrl_switch)"

in /etc/X11/xkb/symbols/fr (xkb_symbols "oss" section).

Revision history for this message
Frédéric Nass (nass) wrote :

Great ! I didn't spot that file.. Thank you Franck.

Revision history for this message
Mathias Kende (mathias-kende) wrote :

For my part this bug has recently worsened because the right alt key (AltGr) is now also an ISO_L key as the right ctrl key in "french alternative" keyboard layout and the tricks of Franck does not fix this (removing the level3(ralt_switch) line).

Revision history for this message
Franck (alci) wrote :

I am trying to figure out how to "define a new type in
/usr/share/X11/xkb/types/extra that does the same thing as the current type used for the space key with right-ctrl hardcoded instead of using iso_level5".

Current type used for the space key is EIGHT_LEVEL, as defined in "level4n" in symbols/nbsp.

So I try to duplicate EIGHT_LEVEL (defined in types/level5) and append this to types/extra.
But the syntax is not clear to me. Here is how EIGHT_LEVEL is defined:

   virtual_modifiers LevelThree,ScrollLock,LevelFive;

    type "EIGHT_LEVEL" {
        modifiers = Shift+LevelThree+LevelFive;
        map[None] = Level1;
        map[Shift] = Level2;
        map[LevelThree] = Level3;
        map[Shift+LevelThree] = Level4;
        map[LevelFive] = Level5;
        map[Shift+LevelFive] = Level6;
        map[LevelThree+LevelFive] = Level7;
        map[Shift+LevelThree+LevelFive] = Level8;
        level_name[Level1] = "Base";
        level_name[Level2] = "Shift";
        level_name[Level3] = "Alt Base";
        level_name[Level4] = "Shift Alt";
        level_name[Level5] = "X";
        level_name[Level6] = "X Shift";
        level_name[Level7] = "X Alt Base";
        level_name[Level8] = "X Shift Alt";
    };

SO we have three types of entries is this file,

- modifiers =
- map[ ] =
- level_name[ ] =

The question is, how to "hardcode" rctrl in this type entry, instead of the current Level5...
If anybody has a clue on this, until now, I couldn't find my way in xkb docs...

(another question is, how can I tell I am effectively getting a narrow non breaking space in an app ?(and not a plain space, or a non breaking space)

Revision history for this message
Franck (alci) wrote :

I have tried the following, with no success:

    type "FIVE_LEVEL_RCTRL" {
        modifiers = Shift+LevelThree+RCtrl;
        map[None] = Level1;
        map[Shift] = Level2;
        map[LevelThree] = Level3;
        map[Shift+LevelThree] = Level4;
        map[RCtrl] = Level5;
        map[Shift+LevelFive] = Level6;
        map[LevelThree+LevelFive] = Level7;
        map[Shift+LevelThree+LevelFive] = Level8;
        level_name[Level1] = "Base";
        level_name[Level2] = "Shift";
        level_name[Level3] = "Alt Base";
        level_name[Level4] = "Shift Alt";
        level_name[Level5] = "RCtrl";
        level_name[Level6] = "X Shift";
        level_name[Level7] = "X Alt Base";
        level_name[Level8] = "X Shift Alt";
    };

So RCtrl must not be the right keyword...

Revision history for this message
Patrice Vetsel (vetsel-patrice) wrote :
Revision history for this message
Franck (alci) wrote :

Thanks Patrice...

So at the same time you gave me my answer: the keyword for right control modifier in xkb type config files is RControl (not rctrl as I tried).

Revision history for this message
Colin Watson (cjwatson) wrote :

Thanks, Patrice. I'll have a look at the more recent patch in that bug.

Colin Watson (cjwatson)
Changed in xkeyboard-config:
status: Confirmed → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xkeyboard-config - 1.1~cvs.20080104.1-1ubuntu6

---------------
xkeyboard-config (1.1~cvs.20080104.1-1ubuntu6) hardy; urgency=low

  * Actually apply ca-shs-add and lekp-add patches. Fix up lekp-add to avoid
    patch conflicts.
  * nbsp-level4nl: Define a new type for French narrow non-breaking space
    handling which hardcodes the Control modifier, rather than relying on a
    level-5 shift which changes the modifier key's function for every key on
    the keyboard (LP: #198759). Patch from Nicolas Mailhot upstream, via
    https://bugs.freedesktop.org/show_bug.cgi?id=9529#c29.

 -- Colin Watson <email address hidden> Mon, 21 Apr 2008 16:42:54 +0100

Changed in xkeyboard-config:
status: In Progress → Fix Released
Revision history for this message
Scaler (balaton22) wrote :

Bug reappeared in Trusty with "French (alternative)" keyboard layout.

Revision history for this message
Yann (cactux) wrote :

I just installed Ubuntu 14.04, instead of 13.10 (new install, not an upgrade): I confirm this bug reappeared.
When you are used to the CTRL key to copy, paste, CTRL+C, etc, it is quite annoying.
How can one apply this 2008 patch to fix it on his system?

Revision history for this message
Edgar Bonet (linu7) wrote :

Can someone please reopen this bug? I confirm it is still here on Ubuntu Trusty 14.04.3 LTS.

I managed to fix the bug on my system. I am sharing here both my findings and a patch.

The upstream fix from freedesktop.org does essentially three things:

 1. In types/pc, define a new type LOCAL_EIGHT_LEVEL. Works like EIGHT_LEVEL but uses Control instead of LevelFive to access the extra shift levels. Does not need to have a key mapped to LevelFive.

 2. In symbols/nbsp, define a mapping for the space key named level4nl. Identical to level4n but with type LOCAL_EIGHT_LEVEL instead of EIGHT_LEVEL.

 3. In symbols/fr, section "oss",
      - remove “include "level5(rctrl_switch)"” (this is the same as Franck's workaround),
      - replace “include "nbsp(level4n)"” with “include "nbsp(level4nl)"”

Inspecting the files on my system, it appears that parts 1 and 2 of the fix are implemented, but part 3 is missing. I browsed the source code at https://code.launchpad.net/ubuntu/+source/xkeyboard-config and it appears the bug has been reintroduced on 2013-12-22, here: http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/trusty/xkeyboard-config/trusty/revision/1.1.16#symbols/fr It also appears to affect Trusty, Vivid and Wily, but not Precise.

The attached patch fixes the issue on my system. This is essentially part 3 of the freedesktop.org fix, with also some comments fixed to match reality. For the patch to be effective, I had to remove the cached precompiled XKB files (sudo rm -f /var/lib/xkb/server-*.xkm) before restarting the server. Now, I have an fr-oss keyboard with a functional Control_R, and I still can type a narrow no-break space (U+202F) as Ctrl+Shift+Space, with either the left or the right control and/or shift keys.

Revision history for this message
Edgar Bonet (linu7) wrote :

I just tried my own patch on Lubuntu 14.04. Control_R works fine, but Ctrl+Shift+Space does NOT yield the expected narrow no-break space. It can still be generated by AltGr+v anyway.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.