Petr Baudis <[EMAIL PROTECTED]> writes:

> Possibly, it gets understood as backspace and treated that way. Does
> Ctrl-<somethingelse> work?

We indeed have this in src/terminal/kbd.c:

#if defined(HAVE_SYS_CONSIO_H) || defined(HAVE_MACHINE_CONSOLE_H) /* BSD */
        case ASCII_BS:
                key = KBD_BS;
                break;
        case ASCII_DEL:
                key = KBD_DEL;
                break;
#else
        case ASCII_BS:
        case ASCII_DEL:
                key = KBD_BS;
                break;
#endif

So try binding the "Backspace" instead.

If your terminal actually sends ASCII 127 for the
delete-backwards key and ASCII 8 for Ctrl-H, and you use Linux
and want to bind both separately, that is unfortunately not
currently possible in ELinks.

Probably the right way to implement that would be to make ELinks
save the termios.c_cc[VERASE] setting on startup, and then map
that to KBD_BS, and ASCII_DEL to KBD_DEL and ASCII_BS to Ctrl+H
if they don't conflict.  ELinks should use VERASE from termios,
rather than the kbs capability from terminfo, because at least
DEC VT420 allows the character to be changed and there are no
separate terminfo definitions for both options.

I don't think Ctrl-H should be aliased to Backspace in the key
binding code.  We have an incomplete Win32 port and these keys
can be distinguished in the Windows console.

However, we could change the key binding UI so that it asks the
user to press a key, and then pre-fills the input field with the
name of that key.  This way, the user wouldn't have to guess how
ELinks is translating the input.

Attachment: pgpgIe4Eq9s2g.pgp
Description: PGP signature

Reply via email to