# keyok 3x 2024-07-27 ncurses 6.5 Library calls

    keyok(3x)                        Library calls                       keyok(3x)

## NAME

           keyok - 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 selects 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

           o   key-code is nonpositive,

           o   key-code is not a recognized value, or

           o   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.

## AUTHORS

           Thomas Dickey

## SEE ALSO

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

    ncurses 6.5                       2024-07-27                         keyok(3x)