Next Previous Contents

## 3.31 cgetc

> Function

>   Read a character from the keyboard.

> Header

>   `conio.h`

> Declaration

>   `char cgetc (void);`

> Description

>   The function reads a character from the keyboard. If there is no character available, `cgetc` waits until the user presses a key. If the cursor is enabled by use of the `cursor` function, a blinking cursor is displayed while waiting.

> Limits

>   - If the system supports a keyboard buffer, `cgetc` will fetch a key from this buffer and wait only if the buffer is empty.
> Availability

>   cc65

> See also

>   cursor, kbhit

> Example

>   None.

Next Previous Contents