Help and Forums
Notes on the transition from ncurses v:5.9 to ncurses v:6.1 (updated 14 Aug 2020)
The NcDialog API, upon which most of the applications on this site are based,
was developed using the ncursesw 5.9 development package, and is fully functional with v:5.9 ncurses.
Starting in mid-2015, Thomas Dickey (maintainer of ncurses) has been working to transition from version 5.9 to version 6.0.
This has been a slow and painful process, both for him and for those of us whose work depends on the ncurses library.
Let's be clear here: Thomas Dickey is an
under-appreciated hero of the GNU/Linux community, and he deserves our support and encouragement.
That said, ncurses 6.0 and the early releases of ncurses 6.1 were not production-worthy. The Linux distribution teams
and the various repositories have been slow to adopt the updated ncurses builds, but have now made the transition
to more stable versions. However, some problems remain.
- Starting in early 2018, we had built the NcDialogAPI against ncursesw 6.0.20160213.
This is the version of the ncurses library shipped with Ubuntu-GNOME 16.4.3LTS. The API built cleanly and ran without
error under the ncursesw 6.0 library, except that a few
of the underlying keycode definitions had changed. Eight(8) to twelve(12) keycodes were affected by this issue.
These are a few of the navigation keys (when conditioned by CTRL and/or ALT modifier keys), and two numeric keypad keys.
If your applications used any of these keys, it may have received the wrong keycodes for these keys.
- Much of this keycode inconsistency is actually due to issues with the underlying terminal definition and not due to any
problem with either ncurses or the NcDialogAPI. If distributions could be relied upon to use Mr. Dickey's most current
terminfo database and termcap file rather than those
included with XTERM, there would be fewer difficulties. We would recommend that if you have the technical expertise to
do so, you should update your terminfo database and generate a new termcap.
(Please visit invisible-island.net for more information.)
- In early 2019, we began building the NcDialogAPI library against various releases of ncursesw 6.1.
The keycode mismatches were still present, so we have written a new utility, “Keymap” which can be used to
create a full map of all key combinations used within the NcDialogAPI.
“Keymap” generates source code (a C++ header file) declaring the keycode constants which are actually
used on the target system, and for applications that need access to this group of keycodes, that keycode map can be
easily integrated into the NcDialogAPI itself.
Since the transition to Fedora31 and Ubuntu v:19.10 (Eoan Ermine) development platforms, the NcDialog API (v:0.0.31 and higher)
has been built against the ncursesw library, version 6.1.20191109. The set of generated
keycodes includes approximately 24 key combination that differ from previous releases. It is likely that these difference stem
from recent design changes to the GNOME/Wayland keyboard interface. We have therefore used the “Keymap” utility
(see above) to generate a new default keymap for the NcDialogAPI based on ncursesw library v:6.1.20191109. This ensures that
existing applications based on the NcDialogAPI will continue to respond to key input as designed.
- The Escape key is no longer being reliably passed through the ncurses key translation engine.
This is not a major problem except that the NcDialogAPI uses the Escape key as a way of abandoning edits within a
dialog user-interface control and restoring the previous state of that control. We have submitted a bug report to
the ncurses maintainer on this issue.
- When drawing window backgrounds using color attributes beyond the basic
sixteen colors, the ncurses library incorrectly calculates the position of the window's left edge.
This is related to the bitmasks used to extract color attributes from the data stream which leaves the ncurses drawing
routine in an indeterminate state. We have compensated for this by flushing the stream after each character written.
We have submitted a bug report to the ncurses maintainer.
We are continuing to research and experiment with this and other issues related to the community's transition to
ncurses v:6.1. Stay tuned.