bugGNU nano - Bugs: bug #57302, ^/ cannot be rebound

 
 

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

bug #57302: ^/ cannot be rebound

Submitter:  Tiago Almeida <tjapro>
Submitted:  Mon 25 Nov 2019 08:27:04 PM UTC
 
Severity:  3 - Normal Status:  Fixed
Assigned to:  bens Open/Closed:  Closed
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       

 

Tue 26 Nov 2019 06:32:48 PM UTC, comment #5: 

Control characters are not meant to get escaped.  Their whole point is: to be single-byte "characters" that are not normal printable characters, so it doesn't make sense to enter them into the buffer, so they can be used to trigger specific commands.

Why several Control-key-plus-symbol produce the same byte (control code) is probably due to different terminal makers chosing different symbols to generate a specific control code.  And thus later terminals chose to allow these different symbols to generate the same code (as long as they did not conflict).

  https://en.wikipedia.org/wiki/ASCII#Control_characters

Anyway, I've added the bindability of ^/, because it is in the same row of the ASCII table as Space, and together with Space it are is only control-character-generating symbol that can be typed without Shift.  That's a very thin rationale, but it will have to do.

Fixed in git, commit 2a97cb9f.

Benno Schulenberg <bens>
Project Administrator
Tue 26 Nov 2019 04:25:41 PM UTC, comment #4: 

And plus, in that commit (14d1b3bd) the numbers are also with the same problem (but in help page).
Again, I don't understand why, but, as an example, in php language when I display something it must be displayed escaped (to prevent wrong things, like run bad commands). The same idea with the input: the user input must be escaped.
But this isn't php, it is c. So, there is some way to escape the input/output of an user...

Tiago Almeida <tjapro>
Tue 26 Nov 2019 04:18:57 PM UTC, comment #3: 

I don't know. Why Linux sees different symbols in equal ways? The / symbol is so different than _ symbol!

Tiago Almeida <tjapro>
Tue 26 Nov 2019 10:39:20 AM UTC, comment #2: 

Well... there is a small reason why ^/ is not rebindable: because it is synonymous with ^_.  But... ^@ and ^Space are synonymous too, and both are rebindable, so...  But when making ^/ rebindable (as an easier-to-type equivalent of ^_), then for consistency also ^` and ^| and ^~ would need to be made rebindable, but I don't want to go there.  Also, on a Linux console the rebinding of ^/ has no effect: ^/ will always do a backspace (unless you change the console keymap).  So... what to do?

Benno Schulenberg <bens>
Project Administrator
Tue 26 Nov 2019 10:03:57 AM UTC, comment #1: 

Wow.  Bug exists since version 2.5.2, and no one noticed until now.  Thanks for reporting!

The offending commit is 14d1b3bd: "Allowing only control sequences in the proper range to be rebound", which was a fix for bug #47025.

Benno Schulenberg <bens>
Project Administrator
Mon 25 Nov 2019 08:27:04 PM UTC, original submission:  

Cannot done a bind like this:

bind ^/ replace main

Error: Key name ^/ is invalid

Tiago Almeida <tjapro>

 

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

Attach Files:
   
   
Comment:
   

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 (Posted a comment)
  • -email is unavailable- added by tjapro (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.

    Only logged-in users can vote.

     

     

     

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-11-30 bens Open/ClosedOpen Closed
    2019-11-26 bens StatusConfirmed Fixed
    2019-11-26 bens StatusNone Confirmed
        Assigned toNone bens
        SummaryBinding ^/ cannot be done ^/ cannot be rebound

    Back to the top


    Powered by Savane 3.9