Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 121922 - Home and End keys don't work in nano anymore
Home and End keys don't work in nano anymore
Status: CLOSED DUPLICATE of bug 122815
Product: Fedora
Classification: Fedora
Component: nano (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: David Woodhouse
: 132032 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2004-04-28 23:47 EDT by Marc Deslauriers
Modified: 2007-11-30 17:10 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-04-28 09:40:02 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Patch for nano to fix home and end (502 bytes, patch)
2004-05-02 15:27 EDT, Marc Deslauriers
no flags Details | Diff
Patch for spec file (852 bytes, patch)
2004-05-02 15:27 EDT, Marc Deslauriers
no flags Details | Diff

  None (edit)
Description Marc Deslauriers 2004-04-28 23:47:12 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1)

Description of problem:
When editing a text file, the "Home" and "End" keys don't work anymore
to go to the beginning or end of a line.

The "Home" key just prints "H" and the "End" key just prints "F"

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

How reproducible:

Steps to Reproduce:
1.nano -w test.txt
2.type a few characters
3.press "Home" or "End"

Actual Results:  The "Home" key just prints "H" and the "End" key just
prints "F"

Expected Results:  Home moves the cursor to the beginning of the line
and End moves to the end of the line

Additional info:

This worked fine in Fedora Core 1.
This bug is a real PITA. :)
Comment 1 Marc Deslauriers 2004-05-02 10:27:06 EDT
Acutally, this looks like a gnome-terminal bug as nano works fine in
text-mode and in xterm.
Comment 2 Anders Kaseorg 2004-05-02 12:55:56 EDT
Home and End are also broken in emacs -nw, in BOTH gnome-terminal and
Comment 3 Marc Deslauriers 2004-05-02 15:26:33 EDT
OK. It seems gnome-terminal now send Alt-O-H for home and Alt-O-F for
end. Nano doesn't know what to do with those.

Here is a clean patch for nano to fix this. Here is also a patch for
the spec file.

Can this be included before Fedora Core 2 comes out so nano will work

Comment 4 Marc Deslauriers 2004-05-02 15:27:08 EDT
Created attachment 99887 [details]
Patch for nano to fix home and end
Comment 5 Marc Deslauriers 2004-05-02 15:27:33 EDT
Created attachment 99888 [details]
Patch for spec file
Comment 6 David Woodhouse 2004-05-02 15:49:17 EDT
This is bizarre; konsole, gnome-terminal and xterm all generate
_different_ bytes on pressing 'Home'. All set TERM to 'xterm', yet I
see (on fc2):

gnome-terminal: 1b 4f 48
konsole: 1b 5b 48
xterm:  1b 5b 31 7e
Comment 7 Marc Deslauriers 2004-05-02 16:29:12 EDT
That's odd... I get Alt-O-H and Alt-O-F in konsole, same as
gnome-terminal. The patch I made works for konsole too in my case.

Comment 8 Marc Deslauriers 2004-05-04 19:29:37 EDT
What is the status on this bug?

These escape sequences are already in nano CVS...
Comment 9 Chris Petersen 2004-05-22 15:08:49 EDT
on a related note, nano also has wirdness with the +-*/ keys on the
keypad if TERM=xterm (they print kjmo, respectively)..  Setting to
TERM=linux fixes the issue (although doesn't fix the home/end issue in
fc2, it did in fc1 - it also makes vi freak out in fc2).  pressing
control-V in bash, and then any of the +-*/ keys doesn't produce any
escape sequences, so I can't see what's going on with nano.
Comment 10 Joe Orton 2004-05-26 09:36:49 EDT
ncurses changed here and broke everything, I don't know if the nano
thing is worth fixing too: see bug 121922.
Comment 11 Joe Orton 2004-05-26 09:37:34 EDT
Duh, bug 122815.
Comment 12 Marc Deslauriers 2004-05-26 15:12:45 EDT
Bug 122815 shure looks like it will resolve the nano bug.
I guess if ncurses is fixed, this bug can be closed.
Comment 13 Alexandre Strube 2005-04-21 11:38:32 EDT
What's the status? We are moving to FC4 and nano still has this issue.
Comment 14 John Thacker 2006-04-28 09:40:02 EDT
This WORKSFORME now, as a result of the fix for Bug 122815 and has for 
a long time.

*** This bug has been marked as a duplicate of 122815 ***
Comment 15 John Thacker 2006-04-28 09:40:36 EDT
*** Bug 132032 has been marked as a duplicate of this bug. ***

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