HP 9000 Series 300 Tutorials Manual page 247

Device i/o and user interfacing hp-ux concepts and tutorials
Hide thumbs Also See for HP 9000 Series 300:
Table of Contents

Advertisement

getchO
wgetch(
win)
mvgetchO
mvwgetch (
win)
Description of Curses Routines (Continued)
Takes a character from the terminal keyboard input buffer
as a 16-bit integer, processes it, and returns it to the
program as a 16-bit integer. Character processing and
return conditions vary as follows:
If mv is placed in front of getch or wgetch, the cursor
position for the selected window is moved to the specified
location which becomes the new current cursor position.
This operation is completed before any character
processing begins.
If echo is active and the character is a normal typing
character (keypad and meta characters are discussed later),
the character is placed in the current cursor position by a
call to waddch from getch. During character placement
in the window, a bit-level logical OR in waddch attaches
current highlighting attributes to the character. waddch is
followed immediately by a call to wrefresh which updates
the terminal screen with the echo character.
If an escape character is received, special timeouts are
set up to determine whether the character is part of a
multiple-character keypad sequence. See Use of Escape in
Program Control topic earlier in this tutorial for a detailed
discussion of how escape is handled.
If meta is enabled and the character is not a keypad
sequence, the 16-bit input character is logical ORed with
octal 0377 to mask the upper bits to zero and return an
8-bit text character value. The eighth bit interferes with
the
A_STANDOUT
highlighting attribute bit in the same
position, so noecho is usually chosen for programs that
operate with meta active.
If meta is not enabled, text characters are logical ORed
with octal 0177 to mask the upper bits to zero and return
a 7-bit character value. Echoing is handled in the normal
manner if enabled.
If keypad is not enabled, function key sequences are treated
as individual characters and handled as normal text.
Curses Routines
2-11

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Hp 9000 series 800

Table of Contents