Translated using Weblate (Chinese (Simplified))
[oweals/minetest.git] / src / client / keys.h
1 /*
2 Minetest
3 Copyright (C) 2016 est31, <MTest31@outlook.com>
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation; either version 2.1 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 GNU Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19
20 #pragma once
21
22 #include <list>
23
24 class KeyType
25 {
26 public:
27         enum T
28         {
29                 // Player movement
30                 FORWARD,
31                 BACKWARD,
32                 LEFT,
33                 RIGHT,
34                 JUMP,
35                 SPECIAL1,
36                 SNEAK,
37                 AUTOFORWARD,
38
39                 ESC,
40
41                 // Other
42                 DROP,
43                 INVENTORY,
44                 CHAT,
45                 CMD,
46                 CMD_LOCAL,
47                 CONSOLE,
48                 MINIMAP,
49                 FREEMOVE,
50                 PITCHMOVE,
51                 FASTMOVE,
52                 NOCLIP,
53                 HOTBAR_PREV,
54                 HOTBAR_NEXT,
55                 MUTE,
56                 INC_VOLUME,
57                 DEC_VOLUME,
58                 CINEMATIC,
59                 SCREENSHOT,
60                 TOGGLE_HUD,
61                 TOGGLE_CHAT,
62                 TOGGLE_FOG,
63                 TOGGLE_UPDATE_CAMERA,
64                 TOGGLE_DEBUG,
65                 TOGGLE_PROFILER,
66                 CAMERA_MODE,
67                 INCREASE_VIEWING_RANGE,
68                 DECREASE_VIEWING_RANGE,
69                 RANGESELECT,
70                 ZOOM,
71
72                 QUICKTUNE_NEXT,
73                 QUICKTUNE_PREV,
74                 QUICKTUNE_INC,
75                 QUICKTUNE_DEC,
76
77                 // hotbar
78                 SLOT_1,
79                 SLOT_2,
80                 SLOT_3,
81                 SLOT_4,
82                 SLOT_5,
83                 SLOT_6,
84                 SLOT_7,
85                 SLOT_8,
86                 SLOT_9,
87                 SLOT_10,
88                 SLOT_11,
89                 SLOT_12,
90                 SLOT_13,
91                 SLOT_14,
92                 SLOT_15,
93                 SLOT_16,
94                 SLOT_17,
95                 SLOT_18,
96                 SLOT_19,
97                 SLOT_20,
98                 SLOT_21,
99                 SLOT_22,
100                 SLOT_23,
101                 SLOT_24,
102                 SLOT_25,
103                 SLOT_26,
104                 SLOT_27,
105                 SLOT_28,
106                 SLOT_29,
107                 SLOT_30,
108                 SLOT_31,
109                 SLOT_32,
110
111                 // joystick specific keys
112                 MOUSE_L,
113                 MOUSE_R,
114                 SCROLL_UP,
115                 SCROLL_DOWN,
116
117                 // Fake keycode for array size and internal checks
118                 INTERNAL_ENUM_COUNT
119
120         };
121 };
122
123 typedef KeyType::T GameKeyType;