ranger-users
[Top][All Lists]
Advanced

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

Re: [Ranger-users] Defining Arrow keys and modifier in rc.conf


From: Wojciech 'vifon' Siewierski
Subject: Re: [Ranger-users] Defining Arrow keys and modifier in rc.conf
Date: Wed, 30 Dec 2015 20:36:51 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0

On 12/30/2015 05:47 PM, Christoph Herzog wrote:
> Hi all,
>
> It seemed to be impossible to bind the Alt key together with right,
> left, up, down keys.
> I tried a variety of possibilities like <A-right> <a-right> <a-Right>
> etc. but to no avail.
>
> On further testing it appeared that those combinations already defined
> in rc.conf are not working either.
> It also seems that arrow keys generally do not work with the C or S
> modifier either.
>
> I tried with 1.7.2 and master.
>
> I'm running KDE 4.14.5. I did not normally experience problems with keys.
>
> Is something wrong or am I missing something?
>
> Thanks
>
>
>
Hello.

It's a limitation of most of the terminals caused by how the arrow keys
are represented. For example urxvt represents the right arrow as "^[[C"
(press ctrl+v and then a key to see the sequence used to represent it).
The most interesting part is the "^[" at the beginning. It is the
sequence representing the escape key. The same sequence used by the alt
modifier which turns for instance "a" into "^[a" (alt+a). You cannot
have double-escape in a sequence so alt+arrow cannot work unless it was
intentionally programmed to output a different sequence in such case.
For example xterm uses different sequences for the arrow keys with each
modifier. Various combinations I've just tested: ^[OC, ^[[1;5C, ^[[1;2C,
^[[1;3C, ^[[1;6C, ^[[1;4C, ^[[1;7C, ^[[1;8C.

The same might apply to control+arrows as "^[" is also the same as
control+[ (which means that control+[ and escape are the same
sequence!). You cannot have double-control either. In my case urxvt
outputs a different sequence though: "^[Oc".

TL;DR: Your terminal does not support it.

-- 
Kind regards,
Wojciech 'vifon' Siewierski


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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