ubuntu gnome-terminal - ignores current keyboard layout for shortcuts

Bug #174832 reported by Samir KHERZI
42
This bug affects 6 people
Affects Status Importance Assigned to Milestone
gnome-terminal (Ubuntu)
Confirmed
Low
Ubuntu Desktop Bugs
Nominated for Lucid by MilkaJinka

Bug Description

Binary package hint: gnome-terminal

Hi,

I'm using ubuntu 7.10 in english (us) language, but with a french keyboard layout.

When I open gnome-terminal, all the bash shortcuts are not bound to the french layout.

For example the shortcut to go at the beginning of the line:
when I type CTRL+a nothing happens whereas CTRL+q works fine.

It's the same for all shortcuts.

I guess gnome-terminal is only checking the language and not the keyboard layout settings ...

Regards,
Samir KHERZI

Revision history for this message
Sebastien Rodriguez (sebastien-rodriguez) wrote :

Hi,

I confirm this bug is annoying.

I used to type Control-W to erase a word, and and I have to use Control-Z.
To suspend a job on bash, I used Control-Z but now I have to type Control-W.

This bug is so annoying that I decided to reuse xterm.

Kind regards,
Sebastien.

Changed in gnome-terminal:
status: New → Confirmed
Revision history for this message
SoloTurn (soloturn) wrote :

same for german ... also setting the layout as "general for everything" does not help.

kind regards.

Revision history for this message
alv (anuncia) wrote :

I am using Ubuntu in english, with USA keyboard layout (changed from german).

I also set the text console keyboard layout to us-english (with dead keys) via dpkg-reconfigure console-tools.

I am using a US keyboard.

Bug: to produce yanking behaviour (C-y) in gnome-terminal I have to hit actually C-z.

Background information:
 * z is mapped to z and y to y.
 * C-y does yank in eterm and xterm
 * C-y does yank in text console.

Revision history for this message
Pedro Villavicencio (pedro) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. You reported this bug a while ago and there hasn't been any activity in it recently. We were wondering is this still an issue for you? Thanks in advance.

Changed in gnome-terminal:
assignee: nobody → desktop-bugs
importance: Undecided → Low
status: Confirmed → Incomplete
Revision history for this message
Sebastien Rodriguez (sebastien-rodriguez) wrote : Re: [Bug 174832] Re: ubuntu gnome-terminal - wrong key mapping in bash with a french keyboard

No this bug seems fixed in ubuntu hardy.

Nevertheless i am not using ubuntu anymore and decided to compile the
package by myself.

Thank you for your support...

2008/8/4 Pedro Villavicencio <email address hidden>:
> Thank you for taking the time to report this bug and helping to make
> Ubuntu better. You reported this bug a while ago and there hasn't been
> any activity in it recently. We were wondering is this still an issue
> for you? Thanks in advance.
>
> ** Changed in: gnome-terminal (Ubuntu)
> Importance: Undecided => Low
> Assignee: (unassigned) => Ubuntu Desktop Bugs (desktop-bugs)
> Status: Confirmed => Incomplete
>
> --
> ubuntu gnome-terminal - wrong key mapping in bash with a french keyboard
> https://bugs.launchpad.net/bugs/174832
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
alv (anuncia) wrote : Re: ubuntu gnome-terminal - wrong key mapping in bash with a french keyboard

My variant of the problem (C-z and C-y switched) is still present in Hardy-AMD64.

Revision history for this message
Oli44 (olivier-heinry) wrote :

Hello,

Using Ubuntu 8.04, still have the problem: French keyboard layout works for most applications (applications with a GUI) but doesnt inside Gnome-terminal (ctrl+q insteead of ctrl+a).

This is very annoying, especially in LTS Ubuntu! I dont want to have to live with that for years!

I spent several hours reconfiguring locales package for nothing since this si the terminal that's wrong! Terminator wroks the same by the way....

Revision history for this message
Pedro Villavicencio (pedro) wrote :

Which keyboard variant are you using a dvorak one?

Revision history for this message
Samir KHERZI (skherzi) wrote : RE : [Bug 174832] Re: ubuntu gnome-terminal - wrong key mapping in bashwith a french keyboard

Hi,

I'm using a classical french AZERTY keyboard from France.

++

-------- Message d'origine--------
De: <email address hidden> de la part de Pedro Villavicencio
Date: ven. 05/09/2008 14:41
À: Kherzi Samir
Objet : [Bug 174832] Re: ubuntu gnome-terminal - wrong key mapping in bashwith a french keyboard

Which keyboard variant are you using a dvorak one?

--
ubuntu gnome-terminal - wrong key mapping in bash with a french keyboard
https://bugs.launchpad.net/bugs/174832
You received this bug notification because you are a direct subscriber
of the bug.

Revision history for this message
Oli44 (olivier-heinry) wrote : Re:RE :[Bug 174832] Re: ubuntu gnome-terminal - wrong key mapping in bashwith a french keyboard

Hi , I'm using the same keyboard, here is an excerpt from my xorg.conf
file:

Section "InputDevice"
 Identifier "Keyboard0"
 Driver "kbd"
 Option "XkbRules" "xorg"
 Option "XkbModel" "pc105"
 Option "XkbLayout" "fr"
 Option "XkbVariant" "oss"
EndSection

++
O.

Le vendredi 05 septembre 2008 à 12:53 +0000, Samir KHERZI a écrit :
> Hi,
>
> I'm using a classical french AZERTY keyboard from France.
>
> ++
>
>
> -------- Message d'origine--------
> De: <email address hidden> de la part de Pedro Villavicencio
> Date: ven. 05/09/2008 14:41
> À: Kherzi Samir
> Objet : [Bug 174832] Re: ubuntu gnome-terminal - wrong key mapping in bashwith a french keyboard
>
> Which keyboard variant are you using a dvorak one?
>
> --
> ubuntu gnome-terminal - wrong key mapping in bash with a french keyboard
> https://bugs.launchpad.net/bugs/174832
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Dieter P (dieter-plaetinck) wrote : Re: ubuntu gnome-terminal - wrong key mapping in bash with a french keyboard

Hi, if I correctly understood some thread I found ( http://www.nabble.com/Bug-479759:-xfce4:-keyboard-shortcuts-don%27t-respect-keyboard-layout-td17083735.html ) gtk seems to be the culprit. It seems to affect gtk-based DE's such as gnome and Xfce, it's seems to be distro-independent and it seems to happen on any keyboard layout that is not 'the default' (which is US querty or whatever)

(I'm having it on Archlinux, using Xfce and dvorak)

Revision history for this message
Dieter P (dieter-plaetinck) wrote :

..And in addition to that, if it would be a gtk bug that would explain why I have the issue with gnome-terminal, Terminal (Xfce), and roxterm. all gtk-based terminals.
It shouldn't happen with xterm, konsole etc

Revision history for this message
Dieter P (dieter-plaetinck) wrote :

After some more research, the root issue here is the way gtk handles more then 2 layouts, and especially switching between them. Some users like to keep the shorctuts of the first layout when they switch to the second, while others like to have their shortcuts in the other layout too.
Currently it seems like Gtk is hardcoded for the first group of people. The 2nd group of people can't do much.
(This becomes really confusing because only gtk apps do this!)

See http://bugzilla.gnome.org/show_bug.cgi?id=162726, where this issue is being discussed for more then 3.5 years now, and there still isn't a viable solution.

Revision history for this message
Samir KHERZI (skherzi) wrote : RE : [Bug 174832] Re: ubuntu gnome-terminal - wrong key mapping in bashwith a french keyboard

Hi Dieter,

thanks for this explanation. I understand now.

I fixed this issue by removing the English layout, so with the french layout, there is no problem now.

I think that this issue can be fixed by adding an option somewhere to select the behaviour. Something like:
 +-------------------------------------+
 | Select the behaviour of shortcuts: |
 | (o) use default layout shortcuts |
 | ( ) use selected layout shortcuts |
 +-------------------------------------+

Do you think you can escalate this proposal to the decision team?

Regards,
Samir KHERZI

-------- Message d'origine--------
De: <email address hidden> de la part de Dieter P
Date: mer. 15/10/2008 22:51
À: Kherzi Samir
Objet : [Bug 174832] Re: ubuntu gnome-terminal - wrong key mapping in bashwith a french keyboard

After some more research, the root issue here is the way gtk handles more then 2 layouts, and especially switching between them. Some users like to keep the shorctuts of the first layout when they switch to the second, while others like to have their shortcuts in the other layout too.
Currently it seems like Gtk is hardcoded for the first group of people. The 2nd group of people can't do much.
(This becomes really confusing because only gtk apps do this!)

See http://bugzilla.gnome.org/show_bug.cgi?id=162726, where this issue
is being discussed for more then 3.5 years now, and there still isn't a
viable solution.

--
ubuntu gnome-terminal - wrong key mapping in bash with a french keyboard
https://bugs.launchpad.net/bugs/174832
You received this bug notification because you are a direct subscriber
of the bug.

Revision history for this message
Dieter P (dieter-plaetinck) wrote : Re: ubuntu gnome-terminal - wrong key mapping in bash with a french keyboard

Your proposal is pretty much what most users on the GTK bugtracker seem to agree would be the best solution.

There are already some patches like that on the gtk bugtracker. Maybe the gnome/ubuntu guys can take a look at it, clean them up if needed and integrate it. Maybe, hopefully, ubuntu/debian devs can even convince the gtk folks to integrate it...

Revision history for this message
Fred Mora (launchpad-net-trace) wrote :

*SOLVED*

I had a similar problem with a brand new install of Ubuntu 9.04 (Jaunty) with a French keyboard.

At the first boot, the keyboard mapping was US. I simply used the gnome-keyboard-properties application to add a French layout and make it the default. At this point, I had two keyboard layouts defined in this app, the US (not used) and the French (default).

However, I observed that in gnome-terminal and some other gtk apps; the emacs line editing command was still obeying the US layout (e.g., to send the cursor to the beginning of the line, Ctrl-A didn't work, I had to hit Ctrl-Q, because Q and A are switched between the French and US layout). So this was the same problem as Oli44 (and other posters).

Solution: using gnome-keyboard-properties, I deleted the US layout. Now the gnome-terminal line editing works normally.

This is still a bug in gtk, however.

Revision history for this message
nanotube (nanotube) wrote :

Running ubuntu 9.04 (jaunty), this bug still present.

default layout is qwerty. when switch to the dvorak layout, all the control shortcuts in gnome-terminal are still in qwerty.

Revision history for this message
Alex Dehnert (adehnert) wrote :

This feels like the same bug as https://bugs.launchpad.net/ubuntu/+source/gnome-terminal/+bug/204202. (Not that that is really likely to help anyone.)

Revision history for this message
Arno Teigseth (arno-teigseth) wrote :

I had a similar problem, not with french but with dvorak layout:
SOLUTION IN UBUNTU JAUNTY
I too suddenly got this strange behaviour, but it used to work before.

Behaviour: In gnome-terminal, before I could start typing a command and then cancel it by pressing Ctrl+I on a qwerty keyboard. That is Ctrl+C on a dvorak.

Suddenly I could not. In fact all Ctrl+<whatever> did not work in gnome-terminal. But they did in openoffice, firefox etc.

After some head scratching and googling I found some hints saying it helped to delete the US layout. Made me think about that I recently had updated my keyboard configuration file (http://arno.homelinux.org/dvorak/), and to make xkb take it into consideration I usually
0) Copy the xkb file into /usr/share/X11/xkb/symbols/
1) Open keyboard preferences and delete the dvorak layout
2) Open keyboard preferences and add the dvorak layout again
Now I can type my updated keyboard.

-But this time the "US Ctrl keys" are in effect no matter what I try, even when choosing the dvorak layout.

MY SOLUTION:
-------------------------------------------
1) Open keyboard preferences and delete all but the dvorak layout
2) Add the layouts again.
3) Enjoy.
-------------------------------------------

To me this is STILL A BUG, since now when I select US keyboard, I have to press Ctrl+I to get a Ctrl+C. In other words, dvorak rules the Ctrl-key. However since I never use anything but my custom layout I'm not very much affected...

When thinking about it, I probably never saw this bug before because I chose Norway dvorak during the install process. It is actually the system default layout, to my cow-orkers' despair. ;)

I'm writing this long story to remember it myself, maybe it will help you too.

Revision history for this message
Samir KHERZI (skherzi) wrote : RE: [Bug 174832] Re: ubuntu gnome-terminal - wrong key mapping in bashwith a french keyboard

That's correct, removing all layouts except the one that you want to use works.
This solved the problem.

Thanks,
Samir

-----Message d'origine-----
De : <email address hidden> [mailto:<email address hidden>] De la part de Arno Teigseth
Envoyé : mercredi 8 juillet 2009 19:49
À : Kherzi Samir
Objet : [Bug 174832] Re: ubuntu gnome-terminal - wrong key mapping in bashwith a french keyboard

I had a similar problem, not with french but with dvorak layout:
SOLUTION IN UBUNTU JAUNTY
I too suddenly got this strange behaviour, but it used to work before.

Behaviour: In gnome-terminal, before I could start typing a command and then cancel it by pressing Ctrl+I on a qwerty keyboard. That is Ctrl+C on a dvorak.

Suddenly I could not. In fact all Ctrl+<whatever> did not work in gnome- terminal. But they did in openoffice, firefox etc.

After some head scratching and googling I found some hints saying it helped to delete the US layout. Made me think about that I recently had updated my keyboard configuration file (http://arno.homelinux.org/dvorak/), and to make xkb take it into consideration I usually
0) Copy the xkb file into /usr/share/X11/xkb/symbols/
1) Open keyboard preferences and delete the dvorak layout
2) Open keyboard preferences and add the dvorak layout again Now I can type my updated keyboard.

-But this time the "US Ctrl keys" are in effect no matter what I try, even when choosing the dvorak layout.

MY SOLUTION:
-------------------------------------------
1) Open keyboard preferences and delete all but the dvorak layout
2) Add the layouts again.
3) Enjoy.
-------------------------------------------

To me this is STILL A BUG, since now when I select US keyboard, I have to press Ctrl+I to get a Ctrl+C. In other words, dvorak rules the Ctrl- key. However since I never use anything but my custom layout I'm not very much affected...

When thinking about it, I probably never saw this bug before because I chose Norway dvorak during the install process. It is actually the system default layout, to my cow-orkers' despair. ;)

I'm writing this long story to remember it myself, maybe it will help you too.

--
ubuntu gnome-terminal - wrong key mapping in bash with a french keyboard
https://bugs.launchpad.net/bugs/174832
You received this bug notification because you are a direct subscriber of the bug.

Revision history for this message
MilkaJinka (milkajinka) wrote : Re: ubuntu gnome-terminal - wrong key mapping in bash with a french keyboard

See #16 at https://bugs.launchpad.net/ubuntu/+source/gnome-terminal/+bug/204202

This bug is still present in Ubuntu 9.10 (Karmic Koala) and is not linked to a particular keyboard layout or a particular keyboard shortcut. However it only affects Gnome Terminal and no other GTK or Gnome app.

What happens is that when using a different keyboard layout than the default one (defined in Keyboard Preferences), Gnome Terminal will ignore this setting **for keyboard shortcuts**, and always assume you're typing them using the default layout.

So if your default layout is US English, and that you are currently using a Dvorak US one, you will have to type keyboard shortcuts **as if you were using the non-Dvorak layout**, which is a real pain in the neck.

Changed in gnome-terminal (Ubuntu):
status: Incomplete → Confirmed
summary: - ubuntu gnome-terminal - wrong key mapping in bash with a french keyboard
+ ubuntu gnome-terminal - ignores current keyboard layout for shortcuts
Revision history for this message
A West (aronwest-lpad) wrote :

Yes, I can confirm this bug as well. I'm using Karmic Koala under VMWare and it was really annoying that the keyboard shortcuts for job control (ctrl-z) and yank text (ctrl-y) were reversed in emacs style editors were reversed. Just spent five hours researching it and was relieved to find these posts which helped me devise a solution which worked for me. My VMWare image from thoughtpolice.co.uk was configured with two initial keyboard layouts: German (dead keys) and USA. System default was USA. I added Canada / English, set it as the system default then removed both the USA and German keyboard layouts. Now the key bindings for ctrl-y (yank text in emacs style editors) and ctrl-z (job control) are working properly. It goes without saying that this bug has to get fixed.

Revision history for this message
Odin Hørthe Omdal (velmont) wrote :

All of these "solutions" are no solutions for me; I'm using my girlfriends macbook and she obviously needs "norwegian machintosh"-layout, but I need "norwegian dvorak". So this bug still bites.

Ohwell, she doesn't use the terminal all too much, but I've taught her CTRL+C closes her "while true:" python programs, so I can't really just change it to CTRL+I, because that's wrong and won't work on another computer.

Sorry for the ugly ""'s, AltGr only works in gnome-terminal (doh!).

Revision history for this message
Samir KHERZI (skherzi) wrote : RE: [Bug 174832] Re: ubuntu gnome-terminal - ignores current keyboardlayout for shortcuts

I Totally agree ...

Regards,
Samir KHERZI

-----Message d'origine-----
De : <email address hidden> [mailto:<email address hidden>] De la part de Odin Hørthe Omdal
Envoyé : mardi 12 janvier 2010 11:00
À : Kherzi Samir
Objet : [Bug 174832] Re: ubuntu gnome-terminal - ignores current keyboardlayout for shortcuts

All of these "solutions" are no solutions for me; I'm using my girlfriends macbook and she obviously needs "norwegian machintosh"-layout, but I need "norwegian dvorak". So this bug still bites.

Ohwell, she doesn't use the terminal all too much, but I've taught her
CTRL+C closes her "while true:" python programs, so I can't really just
change it to CTRL+I, because that's wrong and won't work on another computer.

Sorry for the ugly ""'s, AltGr only works in gnome-terminal (doh!).

--
ubuntu gnome-terminal - ignores current keyboard layout for shortcuts
https://bugs.launchpad.net/bugs/174832
You received this bug notification because you are a direct subscriber of the bug.

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

Other bug subscribers

Remote bug watches

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