[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nano-devel] [PATCH] New feature: Erase prev/next word if ctrl is he

From: Benno Schulenberg
Subject: Re: [Nano-devel] [PATCH] New feature: Erase prev/next word if ctrl is held with backspace/delete
Date: Fri, 13 Jul 2018 10:12:25 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0

Op 13-07-18 om 00:12 schreef Marco Diego Aurélio Mesquita:
> The attached patch modifies nano so that, when ctrl is held, backspace erases
> the previous word, while delete erases the next word.

If that would work, I would have made those bindings a long time ago.
However, on my terminal Ctrl+Backspace produces 0x08, which is the
equivalent of ^H.  We cannot rebind ^H to something else, it must do
a backspace as long as the user doesn't rebind the keystroke.

But you are right, we could at least bind Ctrl+Del to cutwordright
instead of leaving it an unbound key.  In the sample.nanorc we can
then suggest that the user binds ^H to cutwordleft so that Ctrl+Bsp
deletes the preceding word.

> I couldn't find the way to get the key codes for ctrl + backspace nor  ctrl +
> delete; so, I determined it experimentally. It would be nice to detect it the
> same way ctrl+arrows are detected. How can I properly get the codes for ctrl +
> backspace and ctrl + delete?

According to the second table, you should ask for the code for kDC5.


Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]