RetroArch
keyboard_event_dos.h
Go to the documentation of this file.
1 /* RetroArch - A frontend for libretro.
2  * Copyright (C) 2011-2017 - Daniel De Matteis
3  * Copyright (C) 2016-2017 - Brad Parker
4  *
5  * RetroArch is free software: you can redistribute it and/or modify it under the terms
6  * of the GNU General Public License as published by the Free Software Found-
7  * ation, either version 3 of the License, or (at your option) any later version.
8  *
9  * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
10  * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11  * PURPOSE. See the GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License along with RetroArch.
14  * If not, see <http://www.gnu.org/licenses/>.
15  */
16 
17 #ifndef _KEYBOARD_EVENT_DOS_H
18 #define _KEYBOARD_EVENT_DOS_H
19 
20 #include "../input_driver.h"
21 
22 /*
23  * Key codes.
24  */
25 enum {
27  DOSKEY_F1 = 0x3b,
28  DOSKEY_F2 = 0x3c,
29  DOSKEY_F3 = 0x3d,
30  DOSKEY_F4 = 0x3e,
31  DOSKEY_F5 = 0x3f,
32  DOSKEY_F6 = 0x40,
33  DOSKEY_F7 = 0x41,
34  DOSKEY_F8 = 0x42,
35  DOSKEY_F9 = 0x43,
36  DOSKEY_F10 = 0x44,
37 
39  DOSKEY_1 = 0x2,
40  DOSKEY_2 = 0x3,
41  DOSKEY_3 = 0x4,
42  DOSKEY_4 = 0x5,
43  DOSKEY_5 = 0x6,
44  DOSKEY_6 = 0x7,
45  DOSKEY_7 = 0x8,
46  DOSKEY_8 = 0x9,
47  DOSKEY_9 = 0xa,
48  DOSKEY_0 = 0xb,
49  DOSKEY_MINUS = 0xc,
50  DOSKEY_EQUAL = 0xd,
52 
53  DOSKEY_TAB = 0xf,
54  DOSKEY_q = 0x10,
55  DOSKEY_w = 0x11,
56  DOSKEY_e = 0x12,
57  DOSKEY_r = 0x13,
58  DOSKEY_t = 0x14,
59  DOSKEY_y = 0x15,
60  DOSKEY_u = 0x16,
61  DOSKEY_i = 0x17,
62  DOSKEY_o = 0x18,
63  DOSKEY_p = 0x19,
67 
69  DOSKEY_a = 0x1e,
70  DOSKEY_s = 0x1f,
71  DOSKEY_d = 0x20,
72  DOSKEY_f = 0x21,
73  DOSKEY_g = 0x22,
74  DOSKEY_h = 0x23,
75  DOSKEY_j = 0x24,
76  DOSKEY_k = 0x25,
77  DOSKEY_l = 0x26,
79  DOSKEY_QUOTE = 0x28,
80  DOSKEY_RETURN = 0x1c,
81 
82  DOSKEY_LSHIFT = 0x2a,
83  DOSKEY_z = 0x2c,
84  DOSKEY_x = 0x2d,
85  DOSKEY_c = 0x2e,
86  DOSKEY_v = 0x2f,
87  DOSKEY_b = 0x30,
88  DOSKEY_n = 0x31,
89  DOSKEY_m = 0x32,
90  DOSKEY_COMMA = 0x33,
91  DOSKEY_PERIOD = 0x34,
92  DOSKEY_SLASH = 0x35,
93  DOSKEY_RSHIFT = 0x36,
94 
95  DOSKEY_LCTRL = 0x1d,
96  DOSKEY_LSUPER = 0x15b,
97  DOSKEY_LALT = 0x38,
98  DOSKEY_SPACE = 0x39,
99  DOSKEY_RALT = 0x138,
100  DOSKEY_RSUPER = 0x15c,
101  DOSKEY_MENU = 0x15d,
102  DOSKEY_RCTRL = 0x11d,
103 
104  DOSKEY_UP = 0x148,
105  DOSKEY_DOWN = 0x150,
106  DOSKEY_LEFT = 0x14b,
107  DOSKEY_RIGHT = 0x14d,
108 
109  DOSKEY_HOME = 0x147,
110  DOSKEY_END = 0x14f,
111  DOSKEY_PGUP = 0x149,
112  DOSKEY_PGDN = 0x151,
113 };
114 
115 #include <stdint.h>
116 
117 #include <boolean.h>
118 
119 #define LAST_KEYCODE 0x1ff
120 
121 #ifndef MAX_PADS
122 #define MAX_PADS 1
123 #endif
124 
125 #define DOS_KEYBOARD_PORT MAX_PADS
126 
127 bool dos_keyboard_port_input_pressed(const struct retro_keybind *binds, unsigned id);
128 
129 bool dos_keyboard_input_pressed(unsigned key);
130 
132 
133 void dos_keyboard_init(void);
134 
135 void dos_keyboard_free(void);
136 
137 #endif
Definition: keyboard_event_dos.h:79
Definition: keyboard_event_dos.h:70
Definition: keyboard_event_dos.h:102
Definition: keyboard_event_dos.h:46
Definition: keyboard_event_dos.h:69
Definition: keyboard_event_dos.h:111
Definition: keyboard_event_dos.h:26
Definition: keyboard_event_dos.h:76
Definition: input_driver.h:93
Definition: keyboard_event_dos.h:43
Definition: keyboard_event_dos.h:85
Definition: keyboard_event_dos.h:82
Definition: keyboard_event_dos.h:73
Definition: keyboard_event_dos.h:92
includes all by default used to find thumbnails Please choose a single playlist first Add Entry Add Folder Select Files< multiple > Please fill out all required fields RetroArch updated successfully Please restart the application for the changes to take effect Contributors Move Down Load Remove Add Pass No shader passes Reset All Passes Download thumbnail Start on Download All Thumbnails This Playlist Configured in port
Definition: msg_hash_us.h:7699
Definition: keyboard_event_dos.h:80
Definition: keyboard_event_dos.h:57
Definition: keyboard_event_dos.h:101
Definition: keyboard_event_dos.h:40
uint16_t * dos_keyboard_state_get(unsigned port)
Definition: keyboard_event_dos.c:44
void dos_keyboard_init(void)
Definition: keyboard_event_dos.h:93
Definition: keyboard_event_dos.h:96
Definition: keyboard_event_dos.h:72
Definition: keyboard_event_dos.h:110
Definition: keyboard_event_dos.h:64
Definition: keyboard_event_dos.h:39
Definition: keyboard_event_dos.h:87
Definition: keyboard_event_dos.h:47
Definition: keyboard_event_dos.h:106
Definition: keyboard_event_dos.h:33
Definition: keyboard_event_dos.h:71
Definition: keyboard_event_dos.h:99
Definition: keyboard_event_dos.h:66
Definition: keyboard_event_dos.h:28
bool dos_keyboard_input_pressed(unsigned key)
Definition: keyboard_event_dos.c:38
Definition: keyboard_event_dos.h:107
Definition: keyboard_event_dos.h:35
Definition: keyboard_event_dos.h:41
Definition: keyboard_event_dos.h:61
Definition: keyboard_event_dos.h:68
Definition: keyboard_event_dos.h:77
Definition: keyboard_event_dos.h:98
Definition: keyboard_event_dos.h:32
Definition: keyboard_event_dos.h:91
Definition: keyboard_event_dos.h:100
Definition: keyboard_event_dos.h:78
Definition: keyboard_event_dos.h:56
Definition: keyboard_event_dos.h:90
void dos_keyboard_free(void)
Definition: keyboard_event_dos.c:49
Definition: keyboard_event_dos.h:55
Definition: keyboard_event_dos.h:51
Definition: keyboard_event_dos.h:44
Definition: keyboard_event_dos.h:62
enum retro_key key
Definition: input_driver.h:98
Definition: keyboard_event_dos.h:84
Definition: keyboard_event_dos.h:36
Definition: keyboard_event_dos.h:50
Definition: keyboard_event_dos.h:95
Definition: keyboard_event_dos.h:31
Definition: keyboard_event_dos.h:34
Definition: keyboard_event_dos.h:29
Definition: keyboard_event_dos.h:74
Definition: keyboard_event_dos.h:54
Definition: keyboard_event_dos.h:83
Definition: keyboard_event_dos.h:89
Definition: keyboard_event_dos.h:97
Definition: keyboard_event_dos.h:53
Definition: keyboard_event_dos.h:104
Definition: keyboard_event_dos.h:30
Definition: keyboard_event_dos.h:45
Definition: keyboard_event_dos.h:63
Definition: keyboard_event_dos.h:59
Definition: keyboard_event_dos.h:60
Definition: keyboard_event_dos.h:88
Definition: keyboard_event_dos.h:48
Definition: keyboard_event_dos.h:65
Definition: keyboard_event_dos.h:112
Definition: keyboard_event_dos.h:27
Definition: keyboard_event_dos.h:109
Definition: keyboard_event_dos.h:105
Definition: keyboard_event_dos.h:86
Definition: keyboard_event_dos.h:42
Definition: keyboard_event_dos.h:75
unsigned short uint16_t
Definition: stdint.h:125
Definition: keyboard_event_dos.h:38
Definition: keyboard_event_dos.h:58
Definition: keyboard_event_dos.h:49
bool dos_keyboard_port_input_pressed(const struct retro_keybind *binds, unsigned id)
Definition: keyboard_event_dos.c:27