slang-users mailing list

[2001 Date Index] [2001 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: slcurses wgetch() behavior


Glenn Maynard <g_slang@xxxxxxxx> wrote:
>slcurses getch() appears to eat unknwon escape sequences, returning ERR.
>This breaks a lot of keys in mutt when compiled with slang.  I'd
>recommend emulating the ncurses behavior when going through the ncurses
>interface.

I am not sure what you mean by "when going through the ncurses
interface".  S-Lang does not depend upon ncurses nor does it use any
of its functions.  It simply replies upon the existence of the
terminfo database.

As far as binding arbitraty key sequences to keys. this can be done
using the SLkp_define_kesym function.  It associates an arbitray
keysym to a key sequence.  Then SLkp_getkey will return the keysym
when the key is pressed (getch is a wrapper around getch).

[...]
>How are meta keys handled (when using slang directly)?  A quick grep shows:
>
>sltermin.c:   {"mm", 102                UNTIC_COMMENT("turn on meta mode
>  (8th-bit on)")},
>sltermin.c:   {"mo", 101                UNTIC_COMMENT("turn off meta mode")},
>sltermin.c:   {"MT", 40         UNTIC_COMMENT("has meta key")},
>sltermin.c:   {"km", 8          UNTIC_COMMENT("Has a meta key, sets msb high")},
>
>Setting the high bit for meta keys won't work for UTF-8.  Is the far more
>common practice of prepending ^[ supported at all?  (This is unrelated to
>slcurses, of course; meta keys in ncurses-compatibility should just return
>"^[x" in two getch calls.)

None of the applications that I have written query the terminfo
database for these attributes.  The low-level getkey function simply
returns the character passed to it from the OS.

--John


[2001 date index] [2001 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]