key_defined(3x) key_defined(3x)
key_defined - check if a keycode is defined
- キーコードが定義されているか調べる
#include <curses.h>
int key_defined(const char *definition);
This is an extension to the curses library. It permits an
application to determine if a string is currently bound to
any keycode.
これは curses ライブラリに対する拡張機能です。
これを使うと、文字列が現在どれかのキーコードに
関連付けられているかどうかを判定できます。
If the string is bound to a keycode, its value (greater
than zero) is returned. If no keycode is bound, zero is
returned. If the string conflicts with longer strings
which are bound to keys, -1 is returned.
文字列がキーコードに関連付けられていれば、その
(ゼロより大きい) 値を返します。
キーコードに関連付けられていなければ、ゼロを返します。
文字列がキーに関連付けられた長い文字列と矛盾していれば、
-1 を返します。
These routines are specific to ncurses. They were not
supported on Version 7, BSD or System V implementations.
It is recommended that any code depending on them be con-
ditioned using NCURSES_VERSION.
このルーチンは ncurses 特有です。
Version 7, BSD, System V の実装ではサポートされていません。
このルーチンに依存するすべてのコードは、NCURSES_VERSION を
使って条件付きとすることを推奨します。
define_key(3x).
Thomas Dickey.
key_defined(3x)