1 #ifndef KEYBOARD_H_INCLUDED 2 #define KEYBOARD_H_INCLUDED 3 4 5 /* mouse_mode ���� */ 6 #define MOUSE_NONE 0 /* �ޥ��������祤���ƥ��å��ʤ� */ 7 #define MOUSE_MOUSE 1 /* �ޥ��������� */ 8 #define MOUSE_JOYMOUSE 2 /* �ޥ��������祤���ƥ��å��⡼�ɤ����� */ 9 #define MOUSE_JOYSTICK 3 /* ���祤���ƥ��å������� */ 10 11 extern int mouse_mode; /* �ޥ��� 0:No 1:Yes 2:Joy */ 12 13 extern int mouse_sensitivity; /* �ޥ������� */ 14 extern int mouse_swap_button; /* �ޥ����ܥ���������ؤ��� */ 15 16 extern int mouse_key_mode; /* �ޥ������Ϥ���ȿ�� */ 17 extern int mouse_key_assign[6]; 18 19 extern int joy_key_mode; /* ���祤���Ϥ���ȿ�� */ 20 extern int joy_swap_button; /* �ܥ����AB�������ؤ��� */ 21 extern int joy_key_assign[12]; 22 23 extern int joy2_key_mode; /* ���祤�����Ϥ���ȿ�� */ 24 extern int joy2_swap_button; /* �ܥ����AB�������ؤ��� */ 25 extern int joy2_key_assign[12]; 26 27 extern int cursor_key_mode; /* �������륭�����̥�����ȿ�� */ 28 extern int cursor_key_assign[4]; 29 /* Cursor KEY -> 10 KEY , original by funa. (thanks!) */ 30 /* Cursor Key -> Ǥ�դΥ��� , original by floi. (thanks!) */ 31 32 33 extern int tenkey_emu; /* 10 KEY �����Ϥ����� */ 34 extern int numlock_emu; /* software NUM lock */ 35 36 37 enum { /* �ե�������ε�ǽ */ 38 FN_FUNC, /* ���ߤλ��ͤǤ� 31����ޤǤ������� */ 39 FN_FRATE_UP, 40 FN_FRATE_DOWN, 41 FN_VOLUME_UP, 42 FN_VOLUME_DOWN, 43 FN_PAUSE, 44 FN_RESIZE, 45 FN_NOWAIT, 46 FN_SPEED_UP, 47 FN_SPEED_DOWN, 48 FN_FULLSCREEN, 49 FN_IMAGE_NEXT1, 50 FN_IMAGE_PREV1, 51 FN_IMAGE_NEXT2, 52 FN_IMAGE_PREV2, 53 FN_NUMLOCK, 54 FN_RESET, 55 FN_KANA, 56 FN_ROMAJI, 57 FN_CAPS, 58 FN_SNAPSHOT, 59 FN_STATUS, 60 FN_MENU, 61 FN_MAX_SPEED, 62 FN_MAX_CLOCK, 63 FN_MAX_BOOST, 64 FN_end 65 66 /* �����ͤϥ��ơ��ȥե�����˵�Ͽ����Ƥ��ޤ����Ȥ������Ȥϡ������ͤ� 67 �ѹ�����ȥ��ơ��ȥե�����˸ߴ����ʤ��ʤäƤ��ޤ� (��)�� 68 ����ϡ����ơ��ȥ�����/���ơ��ȥ��ɤκݤ˰������ͤ�����Ѵ����� 69 �褦�ˤ����������ݤʤΤǺ���ϸߴ���̵���Ǥ������褦������ */ 70 }; 71 72 extern int function_f[ 1 + 20 ]; /* �ե�������ε�ǽ */ 73 74 extern int fn_max_speed; 75 extern double fn_max_clock; 76 extern int fn_max_boost; 77 78 79 extern int romaji_type; /* �����Ѵ��Υ����� */ 80 81 82 extern byte key_scan[0x10]; /* IN[00-0F] ����������� */ 83 84 extern int romaji_input_mode; /* ��:���������� */ 85 86 extern int mouse_x; /* �ޥ�����ɸ */ 87 extern int mouse_y; 88 89 90 extern int need_focus; /* �ե���������������ߤ��� */ 91 92 extern char *file_rec; /* �������ϵ�Ͽ�Υե�����̾ */ 93 extern char *file_pb; /* �������Ϻ����Υե�����̾ */ 94 95 96 void keyboard_reset(void); 97 void keyboard_update(void); 98 void keyboard_switch(void); 99 100 void init_serial_mouse_data(void); 101 int get_serial_mouse_data(void); 102 103 void key_record_playback_init(void); 104 void key_record_playback_exit(void); 105 106 void keyboard_jop1_reset(void); 107 void keyboard_jop1_strobe(void); 108 109 110 int softkey_is_pressed(int code); /* ��˥塼�Υ��եȥ����� */ 111 void softkey_press(int code); 112 void softkey_release(int code); 113 void softkey_release_all(void); 114 void softkey_bug(void); 115 116 117 void quasi88_cfg_key_numlock(int on); 118 void quasi88_cfg_key_kana(int on); 119 void quasi88_cfg_key_romaji(int on); 120 121 122 123 124 /* �����Х���ǥ����ѹ����Ρ����ꤷ���ͤλؤ����� */ 125 126 #define KEYCODE_INVALID (0) /* ���ꤷ���ͤϡ�̵�� */ 127 #define KEYCODE_SYM (1) /* ���ꤷ���ͤϡ���������ܥ��� */ 128 #define KEYCODE_SCAN (2) /* ���ꤷ���ͤϡ������������ */ 129 130 131 /* ��������ܥ��ʸ���� (XK_xxx �� SDLK_xxx) �� int�ͤ��Ѵ�����ơ��֥� */ 132 133 typedef struct { 134 char *name; /* keysym (��������ܥ�) ʸ���� */ 135 int val; /* �б����롢 int�� */ 136 } T_SYMBOL_TABLE; 137 138 139 int keyboard_str2key88(const char *str); 140 const char *keyboard_key882str(int key88); 141 142 int config_read_keyconf_file( 143 const char *keyconf_filename, 144 const char *(*identify_callback)(const char *parm1, 145 const char *parm2, 146 const char *parm3), 147 const T_SYMBOL_TABLE table_symbol2int[], 148 int table_size, 149 int table_ignore_case, 150 const char *(*setting_callback)(int type, 151 int code, 152 int key88, 153 int numlock_key88)); 154 155 156 157 /*---------------------------------------------------------------------- 158 * QUASI88 ������������� 159 * ������������Ƥ��륭�������ɤϰʲ��Υ����Ǥ��롣 160 * ��PC-8801 ��ɬ�פʥ��� 161 * ��ASCII���Ϥ�ɬ�פʥ��� 162 * ���ޥ��������祤���ƥ��å��Υܥ��� 163 * ��QUASI88 ������ˤ���������ʥ��� 164 *----------------------------------------------------------------------*/ 165 166 #define KEY88_PAD_OFFSET (12) 167 #define KEY88_PAD_MAX (2) 168 #define KEY88_PAD_BUTTON_MAX (8) 169 170 /*#define KEY88_MENU_NUM (31)*/ 171 172 enum { 173 174 KEY88_INVALID = 0, 175 176 /* 1��31 ���ü쵡ǽ�����Ѥ˥ꥵ���֤��Ƥ��� */ 177 178 /* ʸ�������Ѥ���� (ASCII�����ɤ˹���) */ 179 180 KEY88_SPACE = 32, 181 KEY88_EXCLAM = 33, 182 KEY88_QUOTEDBL = 34, 183 KEY88_NUMBERSIGN = 35, 184 KEY88_DOLLAR = 36, 185 KEY88_PERCENT = 37, 186 KEY88_AMPERSAND = 38, 187 KEY88_APOSTROPHE = 39, 188 KEY88_PARENLEFT = 40, 189 KEY88_PARENRIGHT = 41, 190 KEY88_ASTERISK = 42, 191 KEY88_PLUS = 43, 192 KEY88_COMMA = 44, 193 KEY88_MINUS = 45, 194 KEY88_PERIOD = 46, 195 KEY88_SLASH = 47, 196 KEY88_0 = 48, 197 KEY88_1 = 49, 198 KEY88_2 = 50, 199 KEY88_3 = 51, 200 KEY88_4 = 52, 201 KEY88_5 = 53, 202 KEY88_6 = 54, 203 KEY88_7 = 55, 204 KEY88_8 = 56, 205 KEY88_9 = 57, 206 KEY88_COLON = 58, 207 KEY88_SEMICOLON = 59, 208 KEY88_LESS = 60, 209 KEY88_EQUAL = 61, 210 KEY88_GREATER = 62, 211 KEY88_QUESTION = 63, 212 KEY88_AT = 64, 213 KEY88_A = 65, 214 KEY88_B = 66, 215 KEY88_C = 67, 216 KEY88_D = 68, 217 KEY88_E = 69, 218 KEY88_F = 70, 219 KEY88_G = 71, 220 KEY88_H = 72, 221 KEY88_I = 73, 222 KEY88_J = 74, 223 KEY88_K = 75, 224 KEY88_L = 76, 225 KEY88_M = 77, 226 KEY88_N = 78, 227 KEY88_O = 79, 228 KEY88_P = 80, 229 KEY88_Q = 81, 230 KEY88_R = 82, 231 KEY88_S = 83, 232 KEY88_T = 84, 233 KEY88_U = 85, 234 KEY88_V = 86, 235 KEY88_W = 87, 236 KEY88_X = 88, 237 KEY88_Y = 89, 238 KEY88_Z = 90, 239 KEY88_BRACKETLEFT = 91, 240 KEY88_YEN = 92, 241 KEY88_BRACKETRIGHT = 93, 242 KEY88_CARET = 94, 243 KEY88_UNDERSCORE = 95, 244 KEY88_BACKQUOTE = 96, 245 KEY88_a = 97, 246 KEY88_b = 98, 247 KEY88_c = 99, 248 KEY88_d = 100, 249 KEY88_e = 101, 250 KEY88_f = 102, 251 KEY88_g = 103, 252 KEY88_h = 104, 253 KEY88_i = 105, 254 KEY88_j = 106, 255 KEY88_k = 107, 256 KEY88_l = 108, 257 KEY88_m = 109, 258 KEY88_n = 110, 259 KEY88_o = 111, 260 KEY88_p = 112, 261 KEY88_q = 113, 262 KEY88_r = 114, 263 KEY88_s = 115, 264 KEY88_t = 116, 265 KEY88_u = 117, 266 KEY88_v = 118, 267 KEY88_w = 119, 268 KEY88_x = 120, 269 KEY88_y = 121, 270 KEY88_z = 122, 271 KEY88_BRACELEFT = 123, 272 KEY88_BAR = 124, 273 KEY88_BRACERIGHT = 125, 274 KEY88_TILDE = 126, 275 276 /* �ƥ�ʸ���Ѥ���� */ 277 278 KEY88_KP_0 = 128, 279 KEY88_KP_1 = 129, 280 KEY88_KP_2 = 130, 281 KEY88_KP_3 = 131, 282 KEY88_KP_4 = 132, 283 KEY88_KP_5 = 133, 284 KEY88_KP_6 = 134, 285 KEY88_KP_7 = 135, 286 KEY88_KP_8 = 136, 287 KEY88_KP_9 = 137, 288 KEY88_KP_MULTIPLY = 138, 289 KEY88_KP_ADD = 139, 290 KEY88_KP_EQUAL = 140, 291 KEY88_KP_COMMA = 141, 292 KEY88_KP_PERIOD = 142, 293 KEY88_KP_SUB = 143, 294 KEY88_KP_DIVIDE = 144, 295 296 /* �ü쥭���Ѥ���� */ 297 298 KEY88_RETURN = 145, 299 KEY88_HOME = 146, 300 KEY88_UP = 147, 301 KEY88_RIGHT = 148, 302 KEY88_INS_DEL = 149, 303 KEY88_GRAPH = 150, 304 KEY88_KANA = 151, 305 KEY88_SHIFT = 152, 306 KEY88_CTRL = 153, 307 KEY88_STOP = 154, 308 /*KEY88_SPACE = 155,*/ 309 KEY88_ESC = 156, 310 KEY88_TAB = 157, 311 KEY88_DOWN = 158, 312 KEY88_LEFT = 159, 313 KEY88_HELP = 160, 314 KEY88_COPY = 161, 315 KEY88_CAPS = 162, 316 KEY88_ROLLUP = 163, 317 KEY88_ROLLDOWN = 164, 318 319 /* �ե�������Ѥ���� */ 320 321 KEY88_F1 = 165, 322 KEY88_F2 = 166, 323 KEY88_F3 = 167, 324 KEY88_F4 = 168, 325 KEY88_F5 = 169, 326 327 /* ��˥塼�ѥե����������� */ 328 329 KEY88_F11 = 170, 330 KEY88_F12 = 171, 331 KEY88_F13 = 172, 332 KEY88_F14 = 173, 333 KEY88_F15 = 174, 334 KEY88_F16 = 175, 335 KEY88_F17 = 176, 336 KEY88_F18 = 177, 337 KEY88_F19 = 178, 338 KEY88_F20 = 179, 339 340 /* ������ե�������Ѥ���� */ 341 342 KEY88_F6 = 180, 343 KEY88_F7 = 181, 344 KEY88_F8 = 182, 345 KEY88_F9 = 183, 346 KEY88_F10 = 184, 347 348 /* ������ü쥭���Ѥ���� */ 349 350 KEY88_BS = 185, 351 KEY88_INS = 186, 352 KEY88_DEL = 187, 353 KEY88_HENKAN = 188, 354 KEY88_KETTEI = 189, 355 KEY88_PC = 190, 356 KEY88_ZENKAKU = 191, 357 KEY88_RETURNL = 192, 358 KEY88_RETURNR = 193, 359 KEY88_SHIFTL = 194, 360 KEY88_SHIFTR = 195, 361 362 363 /* �ޥ����Ѥ���� */ 364 365 KEY88_MOUSE_UP = 208, 366 KEY88_MOUSE_DOWN = 209, 367 KEY88_MOUSE_LEFT = 210, 368 KEY88_MOUSE_RIGHT = 211, 369 KEY88_MOUSE_L = 212, 370 KEY88_MOUSE_M = 213, 371 KEY88_MOUSE_R = 214, 372 KEY88_MOUSE_WUP = 215, 373 KEY88_MOUSE_WDN = 216, 374 375 /* ���祤�ѥå��Ѥ���� */ 376 377 KEY88_PAD1_UP = 224, 378 KEY88_PAD1_DOWN = 225, 379 KEY88_PAD1_LEFT = 226, 380 KEY88_PAD1_RIGHT = 227, 381 KEY88_PAD1_A = 228, 382 KEY88_PAD1_B = 229, 383 KEY88_PAD1_C = 230, 384 KEY88_PAD1_D = 231, 385 KEY88_PAD1_E = 232, 386 KEY88_PAD1_F = 233, 387 KEY88_PAD1_G = 234, 388 KEY88_PAD1_H = 235, 389 390 KEY88_PAD2_UP = 236, 391 KEY88_PAD2_DOWN = 237, 392 KEY88_PAD2_LEFT = 238, 393 KEY88_PAD2_RIGHT = 239, 394 KEY88_PAD2_A = 240, 395 KEY88_PAD2_B = 241, 396 KEY88_PAD2_C = 242, 397 KEY88_PAD2_D = 243, 398 KEY88_PAD2_E = 244, 399 KEY88_PAD2_F = 245, 400 KEY88_PAD2_G = 246, 401 KEY88_PAD2_H = 247, 402 403 404 /* 248��255 �ϥ����ƥ��Ѥ˥ꥵ���֤��Ƥ��� */ 405 406 KEY88_SYS_STATUS = 254, 407 KEY88_SYS_MENU = 255, 408 409 KEY88_END = 256 410 }; 411 412 413 #endif /* KEYBOARD_H_INCLUDED */ 414