From b74d292847b22cf282ff8ae7d1b51df34176ce4d Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Wed, 25 Mar 2026 03:08:11 -0400 Subject: Banish cgetc(), and all its annoyances. Much more flexible and precise keyboard control, see keytab.[ch] and kgetc.[ch] --- src/keytab.h | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/keytab.h (limited to 'src/keytab.h') diff --git a/src/keytab.h b/src/keytab.h new file mode 100644 index 0000000..04d3df9 --- /dev/null +++ b/src/keytab.h @@ -0,0 +1,34 @@ + +#define XCH_SCR1 0xb1 +#define XCH_SCR2 0xb2 +#define XCH_SCR3 0xb3 +#define XCH_SCR4 0xb4 +#define XCH_SCR5 0xb5 +#define XCH_SCR6 0xb6 +#define XCH_SCR7 0xb7 +/* when/if we have more screens: +#define XCH_SCR8 0xb8 +#define XCH_SCR9 0xb9 +#define XCH_SCR0 0xb0 +*/ + +#define XCH_TAB 0x80 +#define XCH_UP 0x81 +#define XCH_DOWN 0x82 +#define XCH_LEFT 0x83 +#define XCH_RIGHT 0x84 +#define XCH_LWORD 0x85 +#define XCH_RWORD 0x86 +#define XCH_CLS 0x87 +#define XCH_BS 0x88 +#define XCH_ACTIVE 0x89 +#define XCH_CAPS 0x8a + +/* these are just control characters */ +#define XCH_ITAL 0x1d +#define XCH_UNDER 0x1f + +/* cc65's atari.h should define this but doesn't */ +#define XCH_INSCHR 0xff + +extern char keytab[256]; -- cgit v1.2.3