Red Hat Bugzilla – Full Text Bug Listing
|Summary:||Home and End keys don't work in nano anymore|
|Product:||[Fedora] Fedora||Reporter:||Marc Deslauriers <marc.deslauriers>|
|Component:||nano||Assignee:||David Woodhouse <dwmw2>|
|Status:||CLOSED DUPLICATE||QA Contact:|
|Version:||rawhide||CC:||andersk, brownetech, mitr, netdragon|
|Fixed In Version:||Doc Type:||Bug Fix|
|Doc Text:||Story Points:||---|
|Last Closed:||2006-04-28 09:40:02 EDT||Type:||---|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
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) Gecko/20031114 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): nano-1.2.3-1 How reproducible: Always 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 xterm.
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 properly? Thanks!
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 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 ***