Bug 143040 - /etc/inputrc keysequence bad for CTRL-left / CTRL-right in xterm
Summary: /etc/inputrc keysequence bad for CTRL-left / CTRL-right in xterm
Status: CLOSED DUPLICATE of bug 80860
Alias: None
Product: Fedora
Classification: Fedora
Component: setup   
(Show other bugs)
Version: 2
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: David Lawrence
Depends On:
TreeView+ depends on / blocked
Reported: 2004-12-15 21:43 UTC by Richard Andrews
Modified: 2014-03-17 02:51 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-02-21 19:07:43 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Richard Andrews 2004-12-15 21:43:42 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5)
Gecko/20041107 Firefox/1.0

Description of problem:
/etc/inputrc attempts to set up CTRL-left and CRTL-right (cursor arrow
keys) to backward-word  and forward-word respectively. However I find
that they do not work correctly in xterm.

In gnome-terminal the key combination works, but in xterm it results
in "5D" being written at current curson position.

Note: as a work-around the emacs Alt-f and Alt-b combinations do work
in both cases.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. start xterm with bash as shell
2. type command
3. CTRL-left 

Actual Results:  prints "5D"

Expected Results:  cursor should have moved backward by a word

Additional info:

This can be fixed for xterm by modifying /etc/inputrc as follows

Change these lines

"\e[5C": forward-word
"\e[5D": backward-word


"\e[1;5C": forward-word
"\e[1;5D": backward-word

Comment 1 Richard Andrews 2004-12-16 02:17:52 UTC
Just discovered that the above fix breaks bash in gnome-terminal.

I guess the real fix lies somewhere in standardising the behaviour of
xterm and gnome-terminal, but I'm not an expert and don't know which
one is misbehaving.

Is it possible to have conditional inputrc sections? Eg.
gnome-terminal identifies itself by setting COLORTERM=gnome-terminal,
while xterm does not.

Comment 2 Bill Nottingham 2004-12-16 14:44:41 UTC
This should work in FC3.

*** This bug has been marked as a duplicate of 80860 ***

Comment 3 Red Hat Bugzilla 2006-02-21 19:07:43 UTC
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.

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