add key mapping definitions and photo with all key codes

This commit is contained in:
Gered 2021-02-16 17:35:04 -05:00
parent 7d58fcc63c
commit 51efb12958
3 changed files with 95 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 KiB

View file

@ -3,6 +3,8 @@
#include <gctypes.h> #include <gctypes.h>
#include "gckeymap.h"
/** /**
* Attempts to detect the presence of a GC Keyboard Controller connected to any of the controller ports. * Attempts to detect the presence of a GC Keyboard Controller connected to any of the controller ports.
* Returns the SI channel of the found keyboard controller, or -1 if one could not be found. * Returns the SI channel of the found keyboard controller, or -1 if one could not be found.

93
src/gckeymap.h Normal file
View file

@ -0,0 +1,93 @@
#ifndef GCKEYMAP_H_INCLUDED
#define GCKEYMAP_H_INCLUDED
#define KEY_HOME 0x06 // fn + up
#define KEY_END 0x07 // fn + right
#define KEY_PAGEUP 0x08 // fn + left
#define KEY_PAGEDOWN 0x09 // fn + down
#define KEY_SCROLLLOCK 0x0a // fn + insert
// PSO EP1&2 Keymap
// normal shift
#define KEY_A 0x10 // a A
#define KEY_B 0x11 // b B
#define KEY_C 0x12 // c C
#define KEY_D 0x13 // d D
#define KEY_E 0x14 // e E
#define KEY_F 0x15 // f F
#define KEY_G 0x16 // g G
#define KEY_H 0x17 // h H
#define KEY_I 0x18 // i I
#define KEY_J 0x19 // j J
#define KEY_K 0x1a // k K
#define KEY_L 0x1b // l L
#define KEY_M 0x1c // m M
#define KEY_N 0x1d // n N
#define KEY_O 0x1e // o O
#define KEY_P 0x1f // p P
#define KEY_Q 0x20 // q Q
#define KEY_R 0x21 // r R
#define KEY_S 0x22 // s S
#define KEY_T 0x23 // t T
#define KEY_U 0x24 // u U
#define KEY_V 0x25 // v V
#define KEY_W 0x26 // w W
#define KEY_X 0x27 // x X
#define KEY_Y 0x28 // y Y
#define KEY_Z 0x29 // z Z
#define KEY_1 0x2a // 1 !
#define KEY_2 0x2b // 2 "
#define KEY_3 0x2c // 3 #
#define KEY_4 0x2d // 4 $
#define KEY_5 0x2e // 5 %
#define KEY_6 0x2f // 6 &
#define KEY_7 0x30 // 7 '
#define KEY_8 0x31 // 8 (
#define KEY_9 0x32 // 9 )
#define KEY_0 0x33 // 0 ~
#define KEY_MINUS 0x34 // - =
#define KEY_CARET 0x35 // ^ ~
#define KEY_YEN 0x36 // \ |
#define KEY_AT 0x37 // @ `
#define KEY_LEFTBRACKET 0x38 // [ {
#define KEY_SEMICOLON 0x39 // ; +
#define KEY_COLON 0x3a // : *
#define KEY_RIGHTBRACKET 0x3b // ] }
#define KEY_COMMA 0x3c // , <
#define KEY_PERIOD 0x3d // . >
#define KEY_SLASH 0x3e // / ?
#define KEY_BACKSLASH 0x3f // \ _
#define KEY_F1 0x40
#define KEY_F2 0x41
#define KEY_F3 0x42
#define KEY_F4 0x43
#define KEY_F5 0x44
#define KEY_F6 0x45
#define KEY_F7 0x46
#define KEY_F8 0x47
#define KEY_F9 0x48
#define KEY_F10 0x49
#define KEY_F11 0x4a
#define KEY_F12 0x4b
#define KEY_ESC 0x4c
#define KEY_INSERT 0x4d
#define KEY_DELETE 0x4e
#define KEY_GRAVE 0x4f
#define KEY_BACKSPACE 0x50
#define KEY_TAB 0x51
#define KEY_CAPSLOCK 0x53
#define KEY_LEFTSHIFT 0x54
#define KEY_RIGHTSHIFT 0x55
#define KEY_LEFTCTRL 0x56
#define KEY_LEFTALT 0x57
//#define KEY_LEFTUNK1 0x58
#define KEY_SPACE 0x59
//#define KEY_RIGHTUNK1 0x5a
//#define KEY_RIGHTUNK2 0x5b
#define KEY_LEFT 0x5c
#define KEY_DOWN 0x5d
#define KEY_UP 0x5e
#define KEY_RIGHT 0x5f
#define KEY_ENTER 0x61
#endif