diff options
author | Juan J. Martinez <jjm@usebox.net> | 2023-06-05 22:38:57 +0100 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2023-06-05 22:38:57 +0100 |
commit | 830082c1b0219b95ad4f38d1f0270fd210d9b511 (patch) | |
tree | 2a920d1ae02ff68ac608284344edd983f531425a /src/keyb.h | |
parent | 6c93950f95fe77d3877557c8eca08c13f5eb2594 (diff) | |
download | gold-mine-run-830082c1b0219b95ad4f38d1f0270fd210d9b511.tar.gz gold-mine-run-830082c1b0219b95ad4f38d1f0270fd210d9b511.zip |
Add a keyboard driver
Defines for some of the keys.
Diffstat (limited to 'src/keyb.h')
-rw-r--r-- | src/keyb.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/keyb.h b/src/keyb.h new file mode 100644 index 0000000..5e47502 --- /dev/null +++ b/src/keyb.h @@ -0,0 +1,38 @@ +#ifndef _KEYB_H +#define _KEYB_H + +extern volatile uint8_t keys[0xff]; + +void keyb_init(); +void keyb_free(); + +#define KEY_ESC 1 +#define KEY_TAB 15 +#define KEY_ENTER 28 +#define KEY_SPACEBAR 57 + +#define KEY_A 30 +#define KEY_S 31 +#define KEY_Z 44 +#define KEY_X 45 +#define KEY_P 25 + +#define KEY_UP 72 +#define KEY_LEFT 75 +#define KEY_RIGHT 77 +#define KEY_DOWN 80 + +#define KEY_F1 59 +#define KEY_F2 60 +#define KEY_F3 61 +#define KEY_F4 62 +#define KEY_F5 63 +#define KEY_F6 64 +#define KEY_F7 65 +#define KEY_F8 66 +#define KEY_F9 67 +#define KEY_F10 68 +#define KEY_F11 87 +#define KEY_F12 88 + +#endif /* _KEYB_H */ |