Re: Alt+Home and Alt+End not recognized on urxvt

Benno Schulenberg <[email protected]>
Newsgroups gmane.editors.nano.devel
Message-ID <[email protected]>
Hello Sébastien,

>> Anyway, does applying the attached patch (with -p1) to nano-8.0 solve the 
>> issue for you?
> 
> Yes, thanks! Well done.

Okay.  This seems to be a bug in urxvt: for Alt+Home and Alt+End
it doesn't produce dedicated escape sequences but wrongly produces
an extra escape (in my case) or sets the high bit on the last byte
in the sequence for Home/End (in your case).  You probably have
'URxvt.meta8: True' in your ~/.Xresources file, right?

Anyway, workarounds for that bug are now in git:

   https://git.savannah.gnu.org/cgit/nano.git/commit/?id=363a4378


>> Then maybe https://nano-editor.org/dist/latest/faq.html#4.2 needs to be 
>> extended with:
>>    URxvt.keysym.M-Home: \033[1;3H
>>    URxvt.keysym.M-End: \033[1;3F
> 
> No need for me to add this to get Ctrl+Home working.

??  Those sequences are meant for Alt+Home/End, not for Ctrl+Home/End.

(But nano does not recognize these sequences yet.  Will fix later.)


> But regarding the FAQ, §4.2 : if I understand correctly, Ctrl+Shift+Right should 
> select all the word at its right, in one go.

Correct.

> For me it does not work. It is as 
> if the Ctrl key were not pressed; Nano selects the word incrementaly, one more 
> letter at a time as if I had pressed Shift+Right only.

It works fine here, because I have these lines in my ~/.Xresources:

     URxvt.keysym.C-S-Right: \033[1;6C
     URxvt.keysym.C-S-Left: \033[1;6D

If you do not use these key combos in other terminal programs, then
adding them to your ~/.Xresources file should have no ill effect.


> ~> locate rxvt-unicode-256color
> /usr/lib/terminfo/r/rxvt-unicode-256color
> 
> ~> dpkg -S rxvt-unicode-256color
> ncurses-base: /lib/terminfo/r/rxvt-unicode-256color

Oh.  I have that file too.  What happened is that I had ncurses-6.5
installed manually, and then it looked for terminal descriptions in
/usr/local/share/terminfo, not in /lib/terminfo.  After uninstalling
the newer ncurses, rxvt-unicode-256color is found just fine.


Benno
OpenPGP_signature.asc (application/pgp-signature, 840 B)
-----BEGIN PGP SIGNATURE-----

wsF5BAABCAAjFiEEFo5vQpe/16ea/USWUUu+Lrjhlh8FAmY/g68FAwAAAAAACgkQUUu+Lrjhlh/p
FBAAs+d8Vup7zq0w39pq/mAMDx5DCkX0/SKlXF82yvSPSKGb+L5exDczaoQPBMQce/nEO6pjktSL
mFQBCS2Ch8LQokO4BBhxcTdYIDLbRs+zrTIF2oF4W8xm0YsPyPRJvkZFZfa9+cRLGfoCSwM5SQsa
r0xgXC+Fsu9Vn1scJ2gWSBXGnWKGB+y/hOmOod1aWMi6yqzqYT6IXCpNoB5TWW56VvDic1x7TSg0
gOE9q1+5+ItgkGRNFGl/2wthlCV9NP5nPTdFEVud4VuS0nvn4CxHBSiligeWM1b5whZvyXGpJtB1
GmBssR1uSBrehfkH6hy5RPs1nB+2LT4LrowymQTf4NGzsC47fKc0DnX553BP+4Q4fwGO2BLnerR3
pzB9w0J5PX8OUdzkVUvtTUYagybF9lHTmvhF3DMMo2a7UiUKiQVkQq9ikY7/zQXBiqH6146Gn/Cz
iyzajKJ/WxIieUmBat0yGZlMY4DQUt83ihDxULAVLQlFmPNXmERX6vQqOUO5WP7LIy91/TojUVlv
r7l4vXM8cFK/ZqNPSxsNj6uAReR7oPiZxMMUqJuDVwWs2XBR95M/drbwdyyMmKZtlF1dC7HAj6eV
nPznmTT6rOkTB1IvsLHdBuLWHYSdk9vbmcax/rS7RbgrOXStw6ep0zze4xgWi22DS8Wx5WKjERxl
X+g=
=DcOX
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.