nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] [RFC] is it time to break free from the Pico defaults


From: Benno Schulenberg
Subject: Re: [Nano-devel] [RFC] is it time to break free from the Pico defaults
Date: Wed, 19 Dec 2018 20:18:37 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1

Op 19-12-18 om 17:45 schreef David Ramsey:
> Benno Schulenberg:
>> Maybe it's better to drop the whole keypad() call and just
>> use escape sequences only.
> 
> That will break the mouse support, which requires keypad().

Okay.  So the only reason for keypad() is to be able to have mouse
support?

>> If Ctrl+H and <Backspace> produce the exact same keycode, then there
>> is no problem: when the terminfo database is correct, the code will be
>> translated by ncurses to KEY_BACKSPACE (107) and will be bound to
>> do_backspace().  But when those two keystrokes (Ctrl+H and
>> <Backspace>) *do* produce different codes, then it becomes possible to
>> bind them to different things.
> 
> That's what I thought.  But if that's the case, why is it only done
> under the BSDs and MacOS, seeing as some Linux machines do it as well?

Aaah.  So when you type Ctrl+H (on those terminals where <Bsp> produces
7f), nano sees 107 (KEY_BACKSPACE)?  But... on those terminals this is
because of a mismatch between terminfo database and terminal, but on
the BSDs...  Let me check.

On OpenBSD:
$ infocmp | grep kbs
        kbs=\177 ...
$ infocmp -V
ncurses 5.7.20081102

Ow.  That's old.

On NetBSD:
$ infocmp | grep kbs
        kbs=^H ...
$ infocmp -V
infocmp: unknown option -- V
usage: infocmp [-1acnqux] [-A database] [-B database] [-w cols] [term]

So on NetBSD infocmp is not from ncurses.

On FreeBSD there is no infocmp at all.

:|

Don't know.  Can't think right now.

Benno

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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