The curses module does not yet wrap the soft-label-key functions from X/Open Curses. Soft labels are a row of labels displayed along the bottom line of the screen, conventionally used to label a row of function keys; the terminfo capabilities permitting, curses manages and refreshes them independently of the standard window.
The following functions are missing:
slk_init(fmt=0) — reserve a screen line for the labels and choose their layout (3-2-3, 4-4, and, where supported, 4-4-4 and 4-4-4 with an index line). Must be called before initscr() or newterm().
slk_set(labnum, label, justify) / slk_label(labnum) — set and query the text of a label.
slk_refresh(), slk_noutrefresh(), slk_clear(), slk_restore(), slk_touch() — manage the labels on the screen.
slk_attron(attr), slk_attroff(attr), slk_attrset(attr), slk_attr() — the chtype attribute functions.
slk_attr_on(attr), slk_attr_off(attr), slk_attr_set(attr, pair=0), slk_color(pair) — the attr_t/color-pair attribute functions.
Activity
pythongh-152263: Fix the slk_refresh() doc cross-reference
pythongh-152263: Make test_init_reserves_a_line portable to non-ncurs…
gh-152263: Add curses soft-label-key functions (GH-152264)
gh-152263: Fix test_set_wide for locales with wide characters (GH-154583
pythongh-152263: Fix test_set_wide for locales with wide characters (p…