|
|
1.1 root 1: /*
2: Hatari - keymap.h
3:
4: This file is distributed under the GNU Public License, version 2 or at
5: your option any later version. Read the file gpl.txt for details.
6: */
7:
8: //#ifndef HATARI_KEYMAP_H
9: //#define HATARI_KEYMAP_H
10:
11: #include <SDL_keyboard.h>
12: #include "SDL.h"
13:
14:
15: void Keymap_Init(void);
16: char Keymap_RemapKeyToSTScanCode(SDL_Keysym* pKeySym);
17: void Keymap_LoadRemapFile(char *pszFileName);
18: void Keymap_DebounceAllKeys(void);
19: void Keymap_KeyDown(SDL_Keysym *sdlkey);
20: void Keymap_MouseWheel(SDL_MouseWheelEvent* event);
21: void Keymap_KeyUp(SDL_Keysym *sdlkey);
22: void Keymap_SimulateCharacter(char asckey, bool press);
23:
24: void Keymap_MouseMove(int dx, int dy, float lin, float exp);
25: void Keymap_MouseDown(bool left);
26: void Keymap_MouseUp(bool left);
27:
28: /* Definitions for NeXT scancodes */
29:
30: /*
31:
32: Byte at address 0x0200e00a contains modifier key values:
33:
34: x--- ---- valid
35: -x-- ---- alt_right
36: --x- ---- alt_left
37: ---x ---- command_right
38: ---- x--- command_left
39: ---- -x-- shift_right
40: ---- --x- shift_left
41: ---- ---x control
42:
43:
44: Byte at address 0x0200e00b contains key values:
45:
46: x--- ---- key up (1) or down (0)
47: -xxx xxxx key_code
48:
49: */
50:
51:
52: #define NEXTKEY_NONE 0x00
53: #define NEXTKEY_BRGHTNESS_DOWN 0x01
54: #define NEXTKEY_VOLUME_DOWN 0x02
55: #define NEXTKEY_BACKSLASH 0x03
56: #define NEXTKEY_CLOSEBRACKET 0x04
57: #define NEXTKEY_OPENBRACKET 0x05
58: #define NEXTKEY_i 0x06
59: #define NEXTKEY_o 0x07
60: #define NEXTKEY_p 0x08
61: #define NEXTKEY_LEFT_ARROW 0x09
62: /* missing */
63: #define NEXTKEY_KEYPAD_0 0x0B
64: #define NEXTKEY_KEYPAD_PERIOD 0x0C
65: #define NEXTKEY_KEYPAD_ENTER 0x0D
66: /* missing */
67: #define NEXTKEY_DOWN_ARROW 0x0F
68: #define NEXTKEY_RIGHT_ARROW 0x10
69: #define NEXTKEY_KEYPAD_1 0x11
70: #define NEXTKEY_KEYPAD_4 0x12
71: #define NEXTKEY_KEYPAD_6 0x13
72: #define NEXTKEY_KEYPAD_3 0x14
73: #define NEXTKEY_KEYPAD_PLUS 0x15
74: #define NEXTKEY_UP_ARROW 0x16
75: #define NEXTKEY_KEYPAD_2 0x17
76: #define NEXTKEY_KEYPAD_5 0x18
77: #define NEXTKEY_BRIGHTNESS_UP 0x19
78: #define NEXTKEY_VOLUME_UP 0x1A
79: #define NEXTKEY_DELETE 0x1B
80: #define NEXTKEY_EQUALS 0x1C
81: #define NEXTKEY_MINUS 0x1D
82: #define NEXTKEY_8 0x1E
83: #define NEXTKEY_9 0x1F
84: #define NEXTKEY_0 0x20
85: #define NEXTKEY_KEYPAD_7 0x21
86: #define NEXTKEY_KEYPAD_8 0x22
87: #define NEXTKEY_KEYPAD_9 0x23
88: #define NEXTKEY_KEYPAD_MINUS 0x24
89: #define NEXTKEY_KEYPAD_MULTIPLY 0x25
90: #define NEXTKEY_BACKQUOTE 0x26
91: #define NEXTKEY_KEYPAD_EQUALS 0x27
92: #define NEXTKEY_KEYPAD_DIVIDE 0x28
93: /* missing */
94: #define NEXTKEY_RETURN 0x2A
95: #define NEXTKEY_QUOTE 0x2B
96: #define NEXTKEY_SEMICOLON 0x2C
97: #define NEXTKEY_l 0x2D
98: #define NEXTKEY_COMMA 0x2E
99: #define NEXTKEY_PERIOD 0x2F
100: #define NEXTKEY_SLASH 0x30
101: #define NEXTKEY_z 0x31
102: #define NEXTKEY_x 0x32
103: #define NEXTKEY_c 0x33
104: #define NEXTKEY_v 0x34
105: #define NEXTKEY_b 0x35
106: #define NEXTKEY_m 0x36
107: #define NEXTKEY_n 0x37
108: #define NEXTKEY_SPACE 0x38
109: #define NEXTKEY_a 0x39
110: #define NEXTKEY_s 0x3A
111: #define NEXTKEY_d 0x3B
112: #define NEXTKEY_f 0x3C
113: #define NEXTKEY_g 0x3D
114: #define NEXTKEY_k 0x3E
115: #define NEXTKEY_j 0x3F
116: #define NEXTKEY_h 0x40
117: #define NEXTKEY_TAB 0x41
118: #define NEXTKEY_q 0x42
119: #define NEXTKEY_w 0x43
120: #define NEXTKEY_e 0x44
121: #define NEXTKEY_r 0x45
122: #define NEXTKEY_u 0x46
123: #define NEXTKEY_y 0x47
124: #define NEXTKEY_t 0x48
125: #define NEXTKEY_ESC 0x49
126: #define NEXTKEY_1 0x4A
127: #define NEXTKEY_2 0x4B
128: #define NEXTKEY_3 0x4C
129: #define NEXTKEY_4 0x4D
130: #define NEXTKEY_7 0x4E
131: #define NEXTKEY_6 0x4F
132: #define NEXTKEY_5 0x50
133: #define NEXTKEY_POWER 0x58
134:
135: #define NEXTKEY_MOD_META 0x01
136: #define NEXTKEY_MOD_LSHIFT 0x02
137: #define NEXTKEY_MOD_RSHIFT 0x04
138: #define NEXTKEY_MOD_LCTRL 0x08
139: #define NEXTKEY_MOD_RCTRL 0x10
140: #define NEXTKEY_MOD_LALT 0x20
141: #define NEXTKEY_MOD_RALT 0x40
142:
143:
144: //#endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.