RetroArch
input_keymaps.h
Go to the documentation of this file.
1 /* RetroArch - A frontend for libretro.
2  * Copyright (C) 2010-2014 - Hans-Kristian Arntzen
3  * Copyright (C) 2011-2017 - Daniel De Matteis
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 INPUT_KEYMAPS_H__
18 #define INPUT_KEYMAPS_H__
19 
20 #include <stdint.h>
21 
22 #include <retro_common_api.h>
23 #include <libretro.h>
24 
26 
28 {
29  unsigned sym;
30  enum retro_key rk;
31 };
32 
34 {
35  const char *str;
36  enum retro_key key;
37 };
38 
39 #ifdef __APPLE__
40 struct apple_key_name_map_entry
41 {
42  const char* const keyname;
43  const uint32_t hid_id;
44 };
45 
46 extern const struct apple_key_name_map_entry apple_key_name_map[];
47 #endif
48 
49 #define RARCH_KEY_MAP_RWEBINPUT_SIZE 111
50 
51 extern const struct input_key_map input_config_key_map[];
52 
53 extern const struct rarch_key_map rarch_key_map_x11[];
54 extern const struct rarch_key_map rarch_key_map_sdl[];
55 extern const struct rarch_key_map rarch_key_map_sdl2[];
56 extern const struct rarch_key_map rarch_key_map_dinput[];
57 
58  /* is generated at runtime so can't be const */
60 
61 extern const struct rarch_key_map rarch_key_map_linux[];
62 extern const struct rarch_key_map rarch_key_map_apple_hid[];
63 extern const struct rarch_key_map rarch_key_map_android[];
64 extern const struct rarch_key_map rarch_key_map_qnx[];
65 extern const struct rarch_key_map rarch_key_map_dos[];
66 extern const struct rarch_key_map rarch_key_map_wiiu[];
67 extern const struct rarch_key_map rarch_key_map_winraw[];
68 
75 void input_keymaps_init_keyboard_lut(const struct rarch_key_map *map);
76 
87 
97 void input_keymaps_translate_rk_to_str(enum retro_key key, char *buf, size_t size);
98 
100 
102 
103 #endif
const struct rarch_key_map rarch_key_map_dos[]
const struct rarch_key_map rarch_key_map_apple_hid[]
enum retro_key rarch_keysym_lut[RETROK_LAST]
Definition: input_keymaps.c:1547
#define RETRO_BEGIN_DECLS
Definition: retro_common_api.h:41
const struct rarch_key_map rarch_key_map_linux[]
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:8418
const struct rarch_key_map rarch_key_map_x11[]
GLsizeiptr size
Definition: glext.h:6559
Definition: input_keymaps.h:27
enum retro_key input_keymaps_translate_keysym_to_rk(unsigned sym)
Definition: input_keymaps.c:1572
const struct input_key_map input_config_key_map[]
Definition: input_keymaps.c:170
void input_keymaps_init_keyboard_lut(const struct rarch_key_map *map)
Definition: input_keymaps.c:1555
struct rarch_key_map rarch_key_map_rwebinput[RARCH_KEY_MAP_RWEBINPUT_SIZE]
const char * str
Definition: input_keymaps.h:35
const struct rarch_key_map rarch_key_map_sdl2[]
const struct rarch_key_map rarch_key_map_sdl[]
retro_key
Definition: libretro.h:308
const struct rarch_key_map rarch_key_map_android[]
#define RETRO_END_DECLS
Definition: retro_common_api.h:42
Definition: libretro.h:458
Definition: input_keymaps.h:33
unsigned sym
Definition: input_keymaps.h:29
#define RARCH_KEY_MAP_RWEBINPUT_SIZE
Definition: input_keymaps.h:49
const struct rarch_key_map rarch_key_map_qnx[]
void input_keymaps_translate_rk_to_str(enum retro_key key, char *buf, size_t size)
Definition: input_keymaps.c:1596
enum retro_key rk
Definition: input_keymaps.h:30
enum retro_key key
Definition: input_keymaps.h:36
const struct rarch_key_map rarch_key_map_wiiu[]
unsigned int uint32_t
Definition: stdint.h:126
const struct rarch_key_map rarch_key_map_winraw[]
const struct rarch_key_map rarch_key_map_dinput[]