manpagez: man pages & more
info rlman
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.4.8 Character Input

Function: int rl_read_key (void)

Return the next character available from Readline’s current input stream. This handles input inserted into the input stream via rl_pending_input (see section Readline Variables) and rl_stuff_char(), macros, and characters read from the keyboard. While waiting for input, this function will call any function assigned to the rl_event_hook variable.

Function: int rl_getc (FILE *stream)

Return the next character available from stream, which is assumed to be the keyboard.

Function: int rl_stuff_char (int c)

Insert c into the Readline input stream. It will be "read" before Readline attempts to read characters from the terminal with rl_read_key(). Up to 512 characters may be pushed back. rl_stuff_char returns 1 if the character was successfully inserted; 0 otherwise.

Function: int rl_execute_next (int c)

Make c be the next command to be executed when rl_read_key() is called. This sets rl_pending_input.

Function: int rl_clear_pending_input (void)

Unset rl_pending_input, effectively negating the effect of any previous call to rl_execute_next(). This works only if the pending input has not already been read with rl_read_key().

Function: int rl_set_keyboard_input_timeout (int u)

While waiting for keyboard input in rl_read_key(), Readline will wait for u microseconds for input before calling any function assigned to rl_event_hook. u must be greater than or equal to zero (a zero-length timeout is equivalent to a poll). The default waiting period is one-tenth of a second. Returns the old timeout value.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]
© 2000-2017
Individual documents may contain additional copyright information.