[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Unexpected behaviour of Backspace when binding ^H
From: |
Benno Schulenberg |
Subject: |
Re: Unexpected behaviour of Backspace when binding ^H |
Date: |
Wed, 11 Mar 2020 09:53:19 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 |
Hello Ciprian,
Op 11-03-2020 om 01:47 schreef Ciprian Tomoiaga:
> Also, for the bug, do I understand correctly that it will only work with `nano
> -K` ?
It depends. If your 'terminfo' terminal description describes correctly
what the <Backspace> key sends (^?), then rebinding ^H will work without
having to use -K.
But for the Sakura emulator on NomadBSD,
infocmp | grep -o kbs=..
gives: ^H
But when I type ^V <Backspace> at the prompt, it says: ^?
Sakura uses a wrong terminal description, which means that when in
nano I type ^H, ncurses thinks I pressed the <Backspace> key and
sends KEY_BACKSPACE to nano. When I type <Backspace>, ncurses does
not recognize the ^? and sends it untranslated to nano, and nano
assumes that an unrecognized ^? means: backspace.
So, by default, without any rebindings, ^H and <Backspace> will both
do a backspace, even when the terminal description is wrong. But when
you want to rebind ^H, and your terminal description is wrong, you have
to stop ncurses from translating ^H to backspace by using -K.
> If so, does that mean mouse support will be disabled ?
Yes, when using -K/--rawsequences, the mouse cannot be used in nano.
Benno
signature.asc
Description: OpenPGP digital signature