Bug 232373 - ctrl-arrow keys no longer work.
ctrl-arrow keys no longer work.
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: vte (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Behdad Esfahbod
:
Depends On:
Blocks: FC7Target
  Show dependency treegraph
 
Reported: 2007-03-14 21:18 EDT by Dave Jones
Modified: 2015-01-04 17:29 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-04-03 01:29:44 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Single-shift to G3 should not have modifier keys (654 bytes, patch)
2007-05-07 18:54 EDT, James Bowes
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
GNOME Desktop 425462 None None None Never

  None (edit)
Description Dave Jones 2007-03-14 21:18:35 EDT
This is probably somewhere lower in the system than vim, but I'm not sure where
to start looking, so I'm hoping I get lucky with ncurses.

In vim, ctrl-right arrow no longer operates as 'skip over the next word', but
now inserts 1;5c

The other arrow keys do the same thing for different codes.
Comment 1 Miroslav Lichvar 2007-03-15 12:29:25 EDT
In which terminal is this happening, in gnome-terminal?
Comment 2 Miroslav Lichvar 2007-03-19 13:10:26 EDT
gnome-terminal generates escape sequences that vim doesn't recognize, ^[O1;5D
^[O1;5C are generated for ctrl-left ctrl-right while in FC6 gnome-terminal it is
^[O5D ^[O5C.
Comment 3 Dave Jones 2007-04-26 14:37:06 EDT
The wrong characters are also being sent when you use a terminal to ssh.
locally, ctrl-left skips over previous words in bash. but if you ssh somewhere
and try to do the same thing, you'll get ;5D printed out

This bug is *really* irritating, and should get fixed for F7 GA.
Comment 4 Will Woods 2007-04-26 17:35:13 EDT
Yeah, this is a gnome-terminal bug. Ubuntu users have noted similar problems
because gnome-terminal has changed what sequences it outputs for various key
combinations.

See the GNOME bug here: http://bugzilla.gnome.org/show_bug.cgi?id=425462
Comment 5 James Bowes 2007-05-07 18:54:27 EDT
Created attachment 154303 [details]
Single-shift to G3 should not have modifier keys

Here's a patch that seems to work for me, based on the change to xterm
mentioned in the Gnome bug.
Comment 6 Will Woods 2007-05-08 10:21:57 EDT
Based on the comments in the original gnome bug:
http://bugzilla.gnome.org/show_bug.cgi?id=337252

which was linked from the Ubuntu bug I mentioned:
https://bugs.launchpad.net/ubuntu/+source/gnome-terminal/+bug/96676

this looks to be more of a vte bug than gnome-terminal. So I assume this is a
vte patch? I'll apply it and see how it works.
Comment 7 James Bowes 2007-05-08 10:28:25 EDT
(In reply to comment #6)
> this looks to be more of a vte bug than gnome-terminal. So I assume this is a
> vte patch? I'll apply it and see how it works.

Yeah it is. I forgot to mention that part.
Comment 8 Will Woods 2007-05-08 10:56:44 EDT
Having patched vte-0.16.3-2, ctrl-arrow works properly in vi/vim (yay!).

However, it still doesn't work right in irssi (boo!).

Also, shift-arrow causes bash to emit partial escape sequences, so we might need
to add some inputrc magic to handle the new stuff that vte is emitting.. but
that might be another bug.
Comment 9 James Bowes 2007-05-08 12:54:05 EDT
(In reply to comment #8)
> Having patched vte-0.16.3-2, ctrl-arrow works properly in vi/vim (yay!).
> 
> However, it still doesn't work right in irssi (boo!).
> 
> Also, shift-arrow causes bash to emit partial escape sequences, so we might need
> to add some inputrc magic to handle the new stuff that vte is emitting.. but
> that might be another bug.

I'm not sure about irssi, but for bash i figure the problem is that the code I
wrote doesn't care if your in application mode or not, nor does it care if the
key pressed was a cursor key or not.

Comment 10 Behdad Esfahbod 2007-05-08 14:35:20 EDT
Please discuss upstream or your comments will be ignored.
Comment 11 Will Woods 2007-05-11 00:42:43 EDT
The problem with irssi turns out to be an irssi bug, fixed upstream. With the
two current patches in the upstream bugzilla, ctrl-arrow works as expected in
(newer) irssi and vim, but not vim in a screen session. Alas.

Still, as long as vte behavior matches xterm's, anything else is an application
bug rather than a terminal bug.
Comment 12 Will Woods 2007-05-11 13:14:40 EDT
This bug, while completely annoying, doesn't keep anyone from installing or
using their system. Moving to FC7Target.
Comment 13 Dave Jones 2007-05-15 13:27:59 EDT
It's irritating enough to have made me downgrade one machine back to FC6 though.
This really should get fixed for GA imo, or we'll have a lot of dupes of this
after release.
Comment 14 Behdad Esfahbod 2007-05-22 20:46:15 EDT
The upstream bug is fixed now.
Can someone check vte trunk and see if this is indeed fixed?
Comment 15 Matthias Clasen 2007-05-25 09:27:23 EDT
Is it ? The bugs seem to be still open. 
Comment 16 Behdad Esfahbod 2007-05-25 16:47:58 EDT
A similar bug was fixed.  GNOME bug 440475.
Comment 17 Behdad Esfahbod 2007-05-25 16:48:26 EDT
Sorry, meant GNOME Bug 375112 – ctrl-key combinations yielding just key
Comment 18 James Bowes 2007-06-02 12:36:43 EDT
The bug is still there in vte 0.16.4
Comment 19 Dave Jones 2007-07-12 16:47:23 EDT
also still there in vte-0.16.6-1.fc7
Comment 20 Dave Jones 2007-09-21 16:41:58 EDT
and vte-0.16.8-1.fc7

It does seem to be fixed in rawhide however.  Any chance of a backport?
Comment 21 Behdad Esfahbod 2007-09-22 18:53:00 EDT
(In reply to comment #20)
> and vte-0.16.8-1.fc7
> 
> It does seem to be fixed in rawhide however.  Any chance of a backport?

The difference between 0.16.8 and 0.16.9 that is in rawhide is really small.  I
can't imagine how it could make the difference.  I'm guessing that tother
software chaned in between  fixing the issue.  Anyway, pushing 0.16.9 in f7
Updates Testing, please test and let me know if it works.
Comment 22 Dave Jones 2007-10-03 14:24:39 EDT
You were right, upgrading vte to 0.16.9 in F7 doesn't solve the issue.
Comment 23 Dave Jones 2007-11-16 20:48:32 EST
So, this bug has changed slightly.  Initially, ctrl-arrow worked in bash, but
not in vim.   Now in F8 the opposite is true.

in bash..
ctrl-left prints ;5D
shift-left prints ;2D
alt-left prints ;3D
Comment 24 Bastien Nocera 2007-11-16 21:14:38 EST
(In reply to comment #23)
> So, this bug has changed slightly.  Initially, ctrl-arrow worked in bash, but
> not in vim.   Now in F8 the opposite is true.
> 
> in bash..
> ctrl-left prints ;5D
> shift-left prints ;2D
> alt-left prints ;3D

I'd check my bash settings, because it works fine here.
Comment 25 Behdad Esfahbod 2007-12-17 13:18:12 EST
Yep.  F8 works fine here.  You've got TERM=xterm, right?
Comment 26 Dave Jones 2008-01-17 14:15:34 EST
With no .bashrc (ie, just the F8 defaults). I still get the broken behaviour.

bash-3.2$ export | grep TERM
declare -x COLORTERM="gnome-terminal"
declare -x TERM="xterm"
Comment 27 Behdad Esfahbod 2008-01-17 14:43:04 EST
Donno.  What about a new account?
Comment 28 Matthias Clasen 2008-03-17 14:48:30 EDT
I just tried in a freshly installed F9beta, and it works fine.
Comment 29 Matthias Clasen 2008-03-28 15:51:56 EDT
Dave, problem solved for you ?
Comment 30 Matthias Clasen 2008-04-03 01:29:44 EDT
Declaring this fixed for now. 
If you got anything new, just reopen.

Note You need to log in before you can comment on or make changes to this bug.