keyok3ncurses
Enable or disable a curses function key code
Usage
#include <curses.h>
int keyok(int key-code, bool bf);
Overview
The keyok ncurses extension permits a curses application to disable a function key key-code returned by wgetch(3NCURSES) (wide-character API users: wget_wch(3NCURSES)). Key codes that have been disabled can be re-enabled. bf selects the desired enablement status. This operation is more fine-grained than calling keypad(3NCURSES), which affects all function keys.
Return value
keyok returns ERR if
•
|
key-code is nonpositive, |
|---|---|
•
|
key-code is not a recognized value, |
•
|
enablement of key-code is already in the desired state. |
Otherwise, keyok returns OK.
Extensions
keyok is an ncurses extension.
Portability
Applications employing ncurses extensions should condition their use on the visibility of the NCURSES_VERSION preprocessor macro.
NetBSD curses since 2.0 (2004) supports keyok.
Releases
14 releases since Debian 2.1 (Slink); the text changed 9 times.