18 #ifndef __XEMU_COMMON_C64_KBD_MAPPING
19 #define __XEMU_COMMON_C64_KBD_MAPPING
22 #define VIRTUAL_SHIFT_POS 0x64
24 #define LSHIFT_KEY_POS 0x17
25 #define RSHIFT_KEY_POS 0x64
26 #define CBM_KEY_POS 0x75
27 #define CTRL_KEY_POS 0x72
29 #define IS_KEY_PRESSED(pos) (!(kbd_matrix[(pos) >> 4] & (1 << ((pos) & 7))))
31 #define RESTORE_KEY_POS 0x80
32 #define CAPSLOCK_KEY_POS 0x81
33 #define IS_RESTORE_PRESSED() IS_KEY_PRESSED(RESTORE_KEY_POS)
37 #define C65_KEYBOARD_EXTRA_POS 0x90
38 #define SCRL_KEY_POS (C65_KEYBOARD_EXTRA_POS + 0)
39 #define TAB_KEY_POS (C65_KEYBOARD_EXTRA_POS + 1)
40 #define ALT_KEY_POS (C65_KEYBOARD_EXTRA_POS + 2)
51 ,
int kbsel_c65_special
64 ((kbsel_c65_special) ? 0xFF :
kbd_matrix[(C65_KEYBOARD_EXTRA_POS) >> 4]) &
88 (((
kbd_matrix[0] & kbsel_b) == kbsel_b) ? 1 : 0) |
89 (((
kbd_matrix[1] & kbsel_b) == kbsel_b) ? 2 : 0) |
90 (((
kbd_matrix[2] & kbsel_b) == kbsel_b) ? 4 : 0) |
91 (((
kbd_matrix[3] & kbsel_b) == kbsel_b) ? 8 : 0) |
92 (((
kbd_matrix[4] & kbsel_b) == kbsel_b) ? 16 : 0) |
93 (((
kbd_matrix[5] & kbsel_b) == kbsel_b) ? 32 : 0) |
94 (((
kbd_matrix[6] & kbsel_b) == kbsel_b) ? 64 : 0) |
95 (((
kbd_matrix[7] & kbsel_b) == kbsel_b) ? 128 : 0)
102 #ifdef FAKE_TYPING_SUPPORT
104 #ifdef C65_FAKE_TYPING_LOAD_SEQS
105 extern const Uint8 fake_typing_for_go64[];
106 extern const Uint8 fake_typing_for_load64[];
107 extern const Uint8 fake_typing_for_load65[];
110 extern void c64_register_fake_typing (
const Uint8 *keys );
111 extern void c64_stop_fake_typing (
void );
112 extern void c64_handle_fake_typing_internals (
Uint8 keysel );
114 extern int c64_fake_typing_enabled;