TDME2 1.9.121
InputDefinitions.h
Go to the documentation of this file.
1#pragma once
2
3#if defined(_MSC_VER)
4 // this suppresses a warning redefinition of APIENTRY macro
5 #define NOMINMAX
6 #include <windows.h>
7#endif
8#define GLFW_INCLUDE_NONE
9#include <GLFW/glfw3.h>
10
11#define KEYBOARD_MODIFIER_SHIFT GLFW_MOD_SHIFT
12#define KEYBOARD_MODIFIER_CTRL GLFW_MOD_CONTROL
13#define KEYBOARD_MODIFIER_ALT GLFW_MOD_ALT
14
15#define MOUSE_BUTTON_DOWN GLFW_PRESS
16#define MOUSE_BUTTON_UP GLFW_RELEASE
17
18#define MOUSE_BUTTON_NONE 0
19#define MOUSE_BUTTON_LEFT (GLFW_MOUSE_BUTTON_LEFT + 1)
20#define MOUSE_BUTTON_RIGHT (GLFW_MOUSE_BUTTON_RIGHT + 1)
21#define MOUSE_BUTTON_MIDDLE (GLFW_MOUSE_BUTTON_MIDDLE + 1)
22
23#define KEYBOARD_KEYCODE_TAB GLFW_KEY_TAB
24#define KEYBOARD_KEYCODE_TAB_SHIFT -2
25#define KEYBOARD_KEYCODE_BACKSPACE GLFW_KEY_BACKSPACE
26#define KEYBOARD_KEYCODE_RETURN GLFW_KEY_ENTER
27#define KEYBOARD_KEYCODE_DELETE GLFW_KEY_DELETE
28#define KEYBOARD_KEYCODE_SPACE GLFW_KEY_SPACE
29#define KEYBOARD_KEYCODE_LEFT GLFW_KEY_LEFT
30#define KEYBOARD_KEYCODE_UP GLFW_KEY_UP
31#define KEYBOARD_KEYCODE_RIGHT GLFW_KEY_RIGHT
32#define KEYBOARD_KEYCODE_DOWN GLFW_KEY_DOWN
33#define KEYBOARD_KEYCODE_POS1 GLFW_KEY_HOME
34#define KEYBOARD_KEYCODE_END GLFW_KEY_END
35#define KEYBOARD_KEYCODE_ESCAPE GLFW_KEY_ESCAPE
36#define KEYBOARD_KEYCODE_F1 GLFW_KEY_F1
37#define KEYBOARD_KEYCODE_F2 GLFW_KEY_F2
38#define KEYBOARD_KEYCODE_F3 GLFW_KEY_F3
39#define KEYBOARD_KEYCODE_F4 GLFW_KEY_F4
40#define KEYBOARD_KEYCODE_F5 GLFW_KEY_F5
41#define KEYBOARD_KEYCODE_F6 GLFW_KEY_F6
42#define KEYBOARD_KEYCODE_F7 GLFW_KEY_F7
43#define KEYBOARD_KEYCODE_F8 GLFW_KEY_F8
44#define KEYBOARD_KEYCODE_F9 GLFW_KEY_F9
45#define KEYBOARD_KEYCODE_F10 GLFW_KEY_F10
46#define KEYBOARD_KEYCODE_F11 GLFW_KEY_F11
47#define KEYBOARD_KEYCODE_F12 GLFW_KEY_F12
48#define KEYBOARD_KEYCODE_LEFT_SHIFT GLFW_KEY_LEFT_SHIFT
49#define KEYBOARD_KEYCODE_LEFT_CTRL GLFW_KEY_LEFT_CONTROL
50#define KEYBOARD_KEYCODE_LEFT_ALT GLFW_KEY_LEFT_ALT
51#define KEYBOARD_KEYCODE_RIGHT_SHIFT GLFW_KEY_RIGHT_SHIFT
52#define KEYBOARD_KEYCODE_RIGHT_CTRL GLFW_KEY_RIGHT_CONTROL
53#define KEYBOARD_KEYCODE_RIGHT_ALT GLFW_KEY_RIGHT_ALT