[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions , Volume 2


keypad Subroutine

Purpose

Enables or disables abbreviation of function keys.

Library

Curses Library (libcurses.a)

Syntax

#include <curses.h>


int keypad(WINDOW *win,
bool bf);

Description

The keypad subroutine controls keypad translation. If bf is TRUE, keypad translation is turned on. If bf is FALSE, keypad translation is turned off. The initial state is FALSE.

This subroutine affects the behavior of any function that provides keyboard input.

If the terminal in use requires a command to enable it to transmit distinctive codes when a function key is pressed, then after keypad translation is first enabled, the implemenation transmits this command to the terminal before an affected input function tries to read any characters from that terminal.

Parameters


bf  
*win Specifies the window in which to enable or disable the keypad.

Return Values

Upon successful completion, the keypad subroutine returns OK. Otherwise, it returns ERR.

Examples

To turn on the keypad in the user-defined window my_window, use:

WINDOW *my_window;
keypad(my_window, TRUE);

Implementation Specifics

This subroutine is part of Base Operating System (BOS) Runtime.

Related Information

The getch (getch, mvgetch, mvwgetch, or wgetch Subroutine) subroutine.

The terminfo file format.

Curses Overview for Programming, List of Curses Subroutines, Setting Video Attributes and Curses Options in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]