bugGNU nano - Bugs: bug #52972, Ctrl-End is unbound key in...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #52972: Ctrl-End is unbound key in rxvt-unicode

Submitter:  Brand Huntsman <brand>
Submitted:  Thu 25 Jan 2018 07:54:21 AM UTC
   
 
Severity:  2 - Minor Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

Jump to the original submission

Tue 30 Jan 2018 09:55:57 AM UTC, comment #7: 

Released in 2.9.3.  Thanks for reporting.

Benno Schulenberg <bens>
Group administrator
Sun 28 Jan 2018 03:18:04 PM UTC, comment #6: 

Fixed in git, by adding the keycode unconditinally, commit e11021a7.

Benno Schulenberg <bens>
Group administrator
Thu 25 Jan 2018 11:22:09 AM UTC, comment #5: 

The patch works after replacing the case line semicolon with a colon. I'll bisect ncurses in a day or two, to get the version.

Brand Huntsman <brand>
Thu 25 Jan 2018 10:33:17 AM UTC, comment #4: 

Apparently your ncurses doesn't do dynamic keycodes yet.  To work around that, we could do something like the attached patch -- if you can tell me in which version of ncurses this has been fixed.

Or we could simply do '#ifdef KEY_EOL' -- it costs maybe six or eight bytes of code.

(When dynamic keycodes do work, what happens (I think) is: when nano asks for the keycode for Ctrl+End ("kEND5"), ncurses checks what keycode the escape sequence for Ctrl+End produces, which in the urxvt case is 14F, and reports that back.  And after that nano knows that 14F means Ctrl+End.)

(file #43072)

Benno Schulenberg <bens>
Group administrator
Thu 25 Jan 2018 09:41:05 AM UTC, comment #3: 

Ctrl-End works in urxvt 9.21 or 9.22 only with -K.

Without -K
Sequence of hex codes:  1b  5b  37  5e
Sequence of hex codes:  1b  5b  37  5e
Sequence of hex codes: 14f
Sequence of hex codes: 14f
Sequence of hex codes:  18

With -K
Sequence of hex codes:  1b  5b  37  5e
Sequence of hex codes:  1b  5b  37  5e
Sequence of hex codes:  1b  5b  38  5e
Sequence of hex codes:  1b  5b  38  5e
Sequence of hex codes:  18

I bound to ^End but apparently didn't hear the beep or see the mistakes message. :)

Brand Huntsman <brand>
Thu 25 Jan 2018 09:26:35 AM UTC, comment #2: 

Oh, by the way: how do you rebind Ctrl+End in your nanorc?  This should not be possible.

Benno Schulenberg <bens>
Group administrator
Thu 25 Jan 2018 09:21:14 AM UTC, comment #1: 

For me, Ctrl+End works fine on urxvt, with or without the -K option.  Version of urxvt: v9.22.

If you use the -K option (and remove the Xresources workaround), does the Ctrl+End key work right then?  If yes (which it should, if it really produces "Esc [ 8 ^"), then this is most likely a buglet in the terminfo database, which has apparently been fixed in newer versions of ncurses.

You can check by removing the #ifdef DEBUG around the "hex codes" fragment in src/winio.c.  And then running: 'src/nano README 2>TRAIL; cat TRAIL', and type ^Home ^Home ^End ^End ^X.  It should print out: 217 217 212 212 18...

Huh!?  That's what it produces on Xfce Terminal and on uxterm, but on urxvt: 207 207 14F 14F 18.  That 207 differs from 217 is fine, because it is a dynamically assigned keycode.  But how can nano recognize 14F (which is a fixed keycode: clear-to-end-of-line, KEY_EOL) as Ctrl+End?  It works, but how, I don't know.

Benno Schulenberg <bens>
Group administrator
Thu 25 Jan 2018 07:54:21 AM UTC, original submission:  

End, Shift-End and Meta-End all work fine, but Ctrl-End reports unbound key, even when manually bound in nanorc. Ctrl-Home and all modifiers for it work fine.

rxvt-unicode:
^[[7~  Home
^[[7^  Ctrl-Home
^[[8~  End
^[[8^  Ctrl-End

xterm:
^[[H     Home
^[[1;5H  Ctrl-Home
^[[F     End
^[[1;5F  Ctrl-End

Changing Ctrl-End in Xresources to match xterm makes nano work fine.
URxvt.keysym.C-End: \033[1;5F

Is this something that could be fixed in nano?

Brand Huntsman <brand>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #43072:  recognize-KEY-EOL.patch added by bens (450B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bens (Posted a comment)
  • -email is unavailable- added by brand (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-01-30 bens Open/ClosedOpen Closed
    2018-01-28 bens Severity3 - Normal 2 - Minor
        StatusNone Fixed
        Assigned toNone bens
    2018-01-25 bens Attached File- Added recognize-KEY-EOL.patch, #43072

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code