/*
 * $Date: $
 * $Source: $
 * $Revision: $
 * $State: $
 *
 * $Log: $
 */

#ifndef _EMU_KEYB_H
#define _EMU_KEYB_H

#include "emu_defs.h"
#include "base/termio.h"

/*
 * int15 fn=4f will clear CF if scan code should not be used,
 * I set keepkey to reflect CF
 */
EXTERN Boolean keepkey INIT(TRUE);

/*******************************************************************
 * 8042 Keyboard controller emulation                              *
 *******************************************************************/

EXTERN Boolean keys_ready       INIT(0);
EXTERN Bit8u   keyb_ctrl_port61 INIT(0x0e);

extern int   keyboard_init(void);
extern void  keyboard_close(void);

extern void  keyb_init(void);
extern void  keyb_reset(void);

extern void  keyboard_flags_init(void);

extern void  keyb_get_keys(void);
extern void  keybuf_clear(void);

extern void  insert_into_keybuffer(void);
extern void  do_irq1(void);
extern void  scan_to_buffer(void);
extern void  child_set_flags(int sc);
extern int   kbd_flag(int);

extern void  keyb_set_leds(void);
extern void  keyb_set_leds_area(void);

extern void  keyb_queue_scancode(Bit8u);
extern void  keyb_dequeue_scancode(void);

extern void  dos_slang_redraw(void);
extern void  dos_slang_suspend(void);
extern void  dos_slang_smart_set_mono(void);
extern int   init_slang_keymaps(void);
extern void  do_slang_getkeys(void);

#endif /* _EMU_KEYB_H */
