Character Input Events

Character Input Events — Events representing a single keystroke

Functions

Includes

#include <libchimara/glk.h>

Description

You can request character input from text buffer and text grid windows. See evtype_CharInput. There are separate functions for requesting Latin-1 input and Unicode input; see gestalt_Unicode.

Functions

glk_request_char_event ()

void
glk_request_char_event (winid_t win);

Request input of a Latin-1 character or special key. A window cannot have requests for both character and line input at the same time. Nor can it have requests for character input of both types (Latin-1 and Unicode). It is illegal to call glk_request_char_event() if the window already has a pending request for either character or line input.

Parameters

win

A window to request char events from.

 

glk_request_char_event_uni ()

void
glk_request_char_event_uni (winid_t win);

Request input of a Unicode character or special key. See glk_request_char_event().

Parameters

win

A window to request char events from.

 

glk_cancel_char_event ()

void
glk_cancel_char_event (winid_t win);

This cancels a pending request for character input. (Either Latin-1 or Unicode.) For convenience, it is legal to call glk_cancel_char_event() even if there is no charcter input request on that window. Glk will ignore the call in this case.

Parameters

win

A window to cancel the latest char event request on.