mirror of
https://github.com/bradgrantham/apple2e.git
synced 2024-12-28 23:31:26 +00:00
7ad39f891d
Added peek_key and clear_strobe so that an interrupt key can be probed by main loop
26 lines
607 B
C
26 lines
607 B
C
#ifndef _KEYBOARD_H_
|
|
#define _KEYBOARD_H_
|
|
|
|
// Call this to go into raw mode.
|
|
void start_keyboard();
|
|
|
|
// Call this to get our of raw mode. Must be paired with start_keyboard().
|
|
void stop_keyboard();
|
|
|
|
// Call this regularly.
|
|
void poll_keyboard();
|
|
|
|
// Returns the ASCII value in the lower 7 bits and the strobe in the 8th bit.
|
|
unsigned char get_keyboard_data_and_strobe();
|
|
|
|
// Clears the strobe and pretends that no keys are down.
|
|
unsigned char get_any_key_down_and_clear_strobe();
|
|
|
|
// Peek at the current key
|
|
bool peek_key(char *k);
|
|
|
|
// Peek at the current key
|
|
void clear_strobe();
|
|
|
|
#endif /* _KEYBOARD_H_ */
|