[Top][All Lists]

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

Re: [Help-nano] Using shift+arrows to select text

From: Benno Schulenberg
Subject: Re: [Help-nano] Using shift+arrows to select text
Date: Fri, 5 Oct 2018 20:04:19 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

Hello Javier,

Op 05-10-18 om 10:26 schreef Javier Valencia:
> Hello list, I've seen that I can select text using shift+arrows in
> xfce4-terminal, but I wonder why can't I use them in other terminals like 
> urxvt.

Thanks for reporting.

For me, <Shift+Left> and <Shift+Right> work fine.  It's just
<Shift+Up> and <Shift+Down> that don't work -- saying "Unbound key"
instead.  (It can be made to work, though, by using option -K, or
'set rebindkeypad' in your nanorc.)

> Is it something that urxvt needs to implement? or is it nano related?

The problem is that ncurses does not have default codes for
<Shift+Up> and <Shift+Down>, only for <Shift+Left> and <Shift+Right>:
KEY_SLEFT and KEY_SRIGHT.  But most terminals will create codes for
the missing combinations at startup.  So all we have to do is ask
ncurses for the codes for those combinations, and then nano can
recognize them.  See attached patch.


Attachment: 0001-bindings-make-the-Shift-arrow-keys-work-by-default-o.patch
Description: Text Data

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

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