bugGNU nano - Bugs: bug #54071, "Del" and...

 
 

bug #54071: "Del" and "Ins" can be rebound, but the manual does not mention this

Submitted by:  Waffle Wafflerov <wafflewafflerov>
Submitted on:  Wed 06 Jun 2018 12:02:54 PM UTC  
 
Severity:  2 - Minor Status:  Fixed
Assigned to:  David Lawrence Ramsey <dolorous> Open/Closed:  Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 11 Jul 2018 12:53:34 PM UTC, comment #4:

The documentation has been improved (to mention also Ins and Del and ^@ and ^] and ^\ and ^^ and ^_). Patch by David Ramsey, commit 4c023292.

Benno Schulenberg <bens>
Project Administrator
Sat 07 Jul 2018 05:45:18 PM UTC, comment #3:

1) Yes, Del and Ins can be rebound. When the rebinding code was improved (a long time ago, in the 2.3 series), the ability to rebind the cursor-movement keys was dropped, but the ability to rebind "Ins" and "Del" was left intact, as an exception, because I could imagine that someone would want "Ins" to do something else than the same thing as ^R (and "Del" just for symmetry).

But you are right that the manual does not fully describe which things can be rebound. For example, the descriptions don't match ^\ either. I will improve them some time soon.

2) The dedicated cursor-movement keys (the arrows, Home, End, PgUp PgDn) cannot be rebound at all, so not with any modifier either. The special keys Esc and CapsLock cannot be rebound. Tab can be rebound, but not with any modifier, because Tab is identical with ^I, which already has a modifier.

3) The rebinding code does not provide the ability to specify two modifiers, mainly because (as David said) on a console the shifted versions of most modified keystrokes are identical with the unshifted ones.

Benno Schulenberg <bens>
Project Administrator
Sat 09 Jun 2018 05:06:24 PM UTC, comment #2:

It may be difficult or impossible to enable all the hotkeys you mention, since nano is a console program, and can't detect all those keys the same way an X11 program can. (For example, in the console, Ctrl-Shift-Z generates the same value as Ctrl-Z, and a significant number of Alt-<key> combinations either generate <key> alone or nothing at all.) Enabling some Alt hotkeys might be an option if those keys generate something, but it would depend on which keys in particular you're trying to rebind.

However, you're right in that "Del" is not documented as a way to rebind the Delete key. "Ins" is not documented as a way to rebind the "Insert" key, either, but it also works.

David Lawrence Ramsey <dolorous>
Project AdministratorIn charge of this item.
Wed 06 Jun 2018 12:18:54 PM UTC, comment #1:

Firdly I can't (or can I?) make hotkey combination with 3 keys. (Example: ctrl + shift + z) I think it'll be useful too.

Waffle Wafflerov <wafflewafflerov>
Wed 06 Jun 2018 12:02:54 PM UTC, original submission:

Firstly, documentation says:
_The format of key should be one of:
^ followed by an alpha character or the word "Space". Example: ^C
M- followed by a printable character or the word "Space". Example: M-C
F followed by a numeric value from 1 to 16. Example: F10_

Anything else will raise Error like that:
vasiliy@archberry ~ % nano
Error in /home/vasiliy/.nanorc on line 279: Key name must begin with "^", "M", or "F"

But "Del" as key is ok:
vasiliy@archberry ~ % cat .nanorc
bind Del help all
vasiliy@archberry ~ % nano

(No error).

Secondly I can't (or can I?) make hotkey combination with alt (as second key), esc, PgUp, PgDn, Home, End, Insert, tab, CapsLock, shift, super, etc. I think it'll be useful.

Waffle Wafflerov <wafflewafflerov>

 

(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 dolorous (Posted a comment)
  • -email is unavailable- added by wafflewafflerov (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 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-09-10 bens Open/ClosedOpen => Closed
    2018-07-11 bens StatusNone => Fixed
        Assigned tobens => dolorous
    2018-07-07 bens Severity3 - Normal => 2 - Minor
        Assigned toNone => bens
        SummarySpecial hotkeys => "Del" and "Ins" can be rebound, but the manual does not mention this

    Back to the top


    Powered by Savane 3.3