nano-devel
[Top][All Lists]
Advanced

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

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


From: Benno Schulenberg
Subject: Re: Alt+Home and Alt+End not recognized on urxvt
Date: Sat, 11 May 2024 16:41:51 +0200
User-agent: Mozilla Thunderbird


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

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


reply via email to

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