Discussion:
Curses applications to catch SHIFT + cursor keys
(too old to reply)
Sebastian Gniazdowski
2016-05-20 06:26:27 UTC
Permalink
Hello,
is there a way to make curses applications correctly catch SHIFT +
cursor left / cursor right? I tested this with zsh and curses module,
and it doesn't work. Also, following short test application:

http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/i386/1.0-RELEASE/ports/ss/sunfkeys/f1.c

shows that KEY_SLEFT, KEY_SRIGHT aren't catched. On X11 pressing the
combinations outputs an escape series. Is there any solution?

Best regards,
Sebastian Gniazdowski
Thomas Dickey
2016-05-20 11:58:00 UTC
Permalink
----- Original Message -----
| From: "Sebastian Gniazdowski" <***@gmail.com>
| To: freebsd-***@freebsd.org
| Sent: Friday, May 20, 2016 2:26:27 AM
| Subject: Curses applications to catch SHIFT + cursor keys
|
| Hello,
| is there a way to make curses applications correctly catch SHIFT +
| cursor left / cursor right? I tested this with zsh and curses module,
| and it doesn't work. Also, following short test application:
|
| http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/i386/1.0-RELEASE/ports/ss/sunfkeys/f1.c
|
| shows that KEY_SLEFT, KEY_SRIGHT aren't catched. On X11 pressing the
| combinations outputs an escape series. Is there any solution?

It's doable, by calling use_extended_names (an ncurses feature).
However: it would only be useful in the ncurses port, since FreeBSD base install
uses a termcap file which lacks all of the extended keys.
--
Thomas E. Dickey <***@invisible-island.net>
http://invisible-island.net
ftp://invisible-island.net
Loading...