Bug 3090 - Delete, Home, End and Insert keys don't work in default terminal
: Delete, Home, End and Insert keys don't work in default terminal
Status: ACCEPTED
Product: gnome
terminal
: unspecified
: i86pc/i386 OpenSolaris
: P2 enhancement
: dev
Assigned To: Watcher account for desktop bugs
: Watcher account for desktop bugs
:
: vermillion
:
:
:
  Show dependency treegraph
 
Reported: 2008-08-26 11:32 UTC by Roman Strobl
Modified: 2010-01-15 20:47 UTC (History)
14 users (show)

See Also:


Attachments


Note

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


Description Roman Strobl 2008-08-26 11:32:55 UTC
Open the default terminal in 2008.05, then type any text (e.g. "this is a
test"). Move the caret after this using left arrow. Then press Delete key 5x on
PC keyboard. The result is following:

"this ~~~~~is a test"

Now try to press the Home key and End key. There is no response. Insert key
also generates tildas.

I am submitting this bug because I've seen an attendee of a training struggling
heavily with typing in the terminal. I know backspace key works but Delete is
preferred by some users. Also Home and End keys are very useful for navigation
on a long line. Many users are also used to using the Insert key.
Comment 1 Austin English 2008-10-21 17:10:16 UTC
Possibly related, but using:
CTRL + (Left arrow/right arrow) should move one word to the left/right
respectively.
SHIFT + Insert should paste

These are _HIGHLY_ annoying, especially since ctrl+v can't be used to paste in
terminal. Once your in CLI mode, the mouse should be irrelevant...
Comment 2 Harry Lu 2008-10-28 00:10:45 UTC
In Edit-->Profile Preference dialog, this is a Compatibility tab. Change Del
key to generate "ASCII DEL" could fix the Del key problem.

For HOME and END key, I use "Ctrl+a" and "Ctrl+e" to go to the beginning and
end of a long line.

I am not sure whey you need the "Insert" key here, as you are already in Insert
mode.

For copy and paste, it is Shift+Ctrl+c and Shift+Ctrl+V from the menu.
Comment 3 Matt Keenan 2009-01-16 06:24:57 UTC
Tried this out on snv_105 (2008.11)

This is how gnome-terminal works on all platforms. Implementing these
would be seen as enhancements. As to whether they get done I will leave up
to the terminal maintainer.
Comment 4 Austin English 2009-01-16 11:23:46 UTC
(In reply to comment #2)
> In Edit-->Profile Preference dialog, this is a Compatibility tab. Change Del
> key to generate "ASCII DEL" could fix the Del key problem.
> 
> For HOME and END key, I use "Ctrl+a" and "Ctrl+e" to go to the beginning and
> end of a long line.
> 
> I am not sure whey you need the "Insert" key here, as you are already in Insert
> mode.
> 
> For copy and paste, it is Shift+Ctrl+c and Shift+Ctrl+V from the menu.

These work, yeah, but old habits are hard to break.

(In reply to comment #3)
> Tried this out on snv_105 (2008.11)
> 
> This is how gnome-terminal works on all platforms. Implementing these
> would be seen as enhancements. As to whether they get done I will leave up
> to the terminal maintainer.

Fair enough. It works in Ubuntu, and I believe I've seen it work elsewhere, but
I can't recall where off hand.

I believe Konsole supports SHIFT+INSERT, but I'd have to check.
Comment 5 nicola.sabbi 2009-01-28 05:39:20 UTC
Adding a decent /etc/inputrc from a random Linux distribution (I used the one
in Suse) fixes the problem, not only for gnome-terminal, but for bash in all
environments.

I'd like to see such a file added to the default installation of OpenSolaris.
Comment 6 Jürgen Keil 2009-01-28 06:38:43 UTC
Part of the problem (home, end, page) can be fixed with an updated
xterm terminfo entry, see bug 5574


Insert and Delete key do work in vim, but not in applications using gnu 
readline.  That can be fixed with an /etc/inputrc ...
Comment 7 Hillel Lubman 2009-11-23 18:21:15 UTC
After upgrading to OpenSolaris snv_127 DEL stopped working as expected
(deleting the next character), even with /etc/inputrc set up as follows:

#---- sample /etc/inputrc -----
set meta-flag on
set input-meta on
set convert-meta off
set output-meta on

# Completed names which are symbolic links to
# directories have a slash appended.
set mark-symlinked-directories on

$if mode=emacs

# for linux console and RH/Debian xterm
"\e[1~": beginning-of-line
"\e[4~": end-of-line
"\e[5~": beginning-of-history
"\e[6~": end-of-history
"\e[3~": delete-char
"\e[2~": quoted-insert
"\e[5C": forward-word
"\e[5D": backward-word
"\e[1;5C": forward-word
"\e[1;5D": backward-word

# for rxvt
"\e[8~": end-of-line

# for non RH/Debian xterm, can't hurt for RH/Debian xterm
"\eOH": beginning-of-line
"\eOF": end-of-line

# for freebsd console
"\e[H": beginning-of-line
"\e[F": end-of-line
$endif
Comment 8 Joshua D Miller 2009-11-24 17:45:05 UTC
(In reply to comment #5)
> Adding a decent /etc/inputrc from a random Linux distribution (I used the one
> in Suse) fixes the problem, not only for gnome-terminal, but for bash in all
> environments.
> 
> I'd like to see such a file added to the default installation of OpenSolaris.

I concur with adding a default inputrc in future releases. This is a simple
ease-of-use feature that is found in all major Linux distributions (Fedora,
openSUSE, Arch, CentOS/RHEL, and Ubuntu) that would be great to include in the
next os.
Comment 9 Hillel Lubman 2009-12-02 01:27:27 UTC
/etc/inputrc stopped working for DEL key in OpenSolaris snv_127, with setting

"\e[3~": delete-char

However ~/.inputrc with this setting solves the problem. Shouldn't /etc/inputrc
alone normally work?