keyok.3x - Man Page

enable or disable a curses function key code

Synopsis

#include <curses.h>

int keyok(int key-code, bool bf);

Description

The keyok ncurses extension permits a curses application to disable a function key key-code returned by wgetch(3X) (wide-character API users: wget_wch(3X)). Key codes that have been disabled can be re-enabled. bf indicates the desired enablement status. This operation is more fine-grained than calling keypad(3X), which affects all function keys.

Return Value

keyok returns ERR if

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.

Authors

Thomas Dickey

See Also

curses(3X), define_key(3X), keybound(3X), keyok(3X), key_defined(3X)

Info

2024-06-15 ncurses 6.5 Library calls