Package: libncursesw5
Version: 5.9+20140913-1+b1
Severity: normal
Dear Maintainer,
I am the author of a curses-based terminal emulator, and noticed that
wget_wch() is returning KEY_CODE_YES with values that are outside the
range KEY_MIN and KEY_MAX. This behavior is inconsistent with the
documented API.
I have confirmed that xterm is doing the right thing, e.g.
PgUp = "CSI 5 ~"
Ctrl-PgUp = "CSI 5;5 ~"
Alt-PgUp = "CSI 5;3 ~"
Keystrokes and values I have seen (these are decimal values, not
octal) returned from wget_wch() include:
538 == Alt-Ins
517 == Alt-Del
533 == Alt-Home
528 == Alt-End
540 == Ctrl-Ins
519 == Ctrl-Del
555 == Ctrl-PgUp
550 == Ctrl-PgDn
535 == Ctrl-Home
530 == Ctrl-End
553 == Shift-PgUp
548 == Shift-PgDn
I can replicate this behavior on xterm, xfce-terminal, and konsole. I
suspect that this might be terminfo rather than ncurses.
I have put a small test program to demonstrate this behavior over at
http://qodem.sf.net/misc/ncurses_wget_wch_tester.c . 'gcc -o test
ncurses_wget_wch_tester.c -lncursesw' builds it. Run it, press Ctrl-C
to exit.
I think this behavior started somewhere in Jessie, but possibly
Wheezy. Between Sarge and Squeeze wget_wch() would return the full
xterm sequence which I could parse myself.
-- System Information:
Debian Release: 8.4
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.16.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
Versions of packages libncursesw5 depends on:
ii libc6 2.19-18+deb8u4
ii libtinfo5 5.9+20140913-1+b1
ii multiarch-support 2.19-18+deb8u4
Versions of packages libncursesw5 recommends:
ii libgpm2 1.20.4-6.1+b2
libncursesw5 suggests no packages.
-- no debconf information