bugGNU nano - Bugs: bug #57482, with --raw, <Shift+F1...F4>...

 
 

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

bug #57482: with --raw, <Shift+F1...F4> say "Unknown sequence" on xterm

Submitted by:  Benno Schulenberg <bens>
Submitted on:  Thu 26 Dec 2019 10:43:49 AM UTC  
 
Severity:  2 - Minor Status:  Fixed
Assigned to:  Benno Schulenberg <bens> Open/Closed:  Closed

Thu 26 Dec 2019 04:25:32 PM UTC, comment #4: 

Fixed in git, commit 38c286c0.  The "Esc [ 1 ; 2 X" (for X is P to S) are now recognized.  This should normally never be needed, because terminals that produce these sequences advertise themselves correctly as some kind of xterm, so ncurses will be able to correctly translate these sequences into their corresponding keycodes.  (As it's normally never needed, I've left it out of the tiny version.)

But for Konsole, nano must recognize the bare escape sequences, because Konsoles normally advertise themselves as some kind of xterm, so ncurses will (based on the selected terminfo record) not recognize the "Esc O 2 X" sequences, so nano itself must recognize them.  :|

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Thu 26 Dec 2019 01:30:47 PM UTC, comment #3: 

I am tempted to simply remove the support for raw escape sequences for F13 to F16.  These raw keystorkes only ever worked on Gnome Terminal and Konsole, not on xterm or Xfce Terminal or other xterm-compatible terminals, because the code does not recognize the "Esc [ 1 ; 2 X" sequences.  No one ever complained about this, so... most likely no one is using F13 to F16, or at least not in combination with --raw.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Thu 26 Dec 2019 11:38:12 AM UTC, comment #2: 

(On most terminals, <Shift+Fn> == <Fn+12>.  But on Eterm and Urxvt, <Shift+Fn> == <Fn+10>.  So, there <Shift+F1> == <F11>.  Strange.  Why the overlap?)

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Thu 26 Dec 2019 11:04:47 AM UTC, comment #1: 

In src/winio.c, it says somwhere: "Esc O 2 P == F13 on xterm"...  But this isn't true.  It is true only on Konsole, as far as I can tell.

And where it says "Esc O 1 ; 2 P == F13 on Terminal", only Gnome Terminal can be meant, because it is "Esc [ 1 ; 2 P" on Xfce Terminal and several other xterm-compatible terminals.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Thu 26 Dec 2019 10:43:49 AM UTC, original submission:  

To reproduce, add the following four lines at the end of your ~/.nanorc (where ^M is a literal Ctrl+M):

bind F13 "thirteen^M" main
bind F14 "fourteen^M" main
bind F15 "fifteen^M" main
bind F16 "sixteen^M" main

Then run 'nano --raw' in an xterm or in an Xfce Terminal, and type <Shift+F1>, <Shift+F2>, <Shift+F3>, <Shift+F4>.  See that each keystroke reports "[ Unknown sequence ]".

(On Eterm and Urxvt, it are <Shift+F3>...<Shift+F6> that report this "Unknown sequence".)

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-02-09 bens Open/ClosedOpen => Closed
    2020-01-02 bens Summarywith --raw, <Shift+F1>...<Shift+F4> say "Unknown sequence" on xterm => with --raw, say "Unknown sequence" on xterm
    2019-12-26 bens Summarywhen using --raw, <Shift+F1>...<Shift+F4> say "Unknown sequence" on xterm => with --raw, ... say "Unknown sequence" on xterm
    2019-12-26 bens StatusNone => Fixed

    Back to the top


    Powered by Savane 3.7