MGL(Win32)
読み取り中…
検索中…
一致する文字列を見つけられません
mgl_keyboard_keycode.h
[詳解]
1// SPDX-License-Identifier: Zlib
2/* ------------------------------------------------------------------------- */
9/* ------------------------------------------------------------------------- */
10
11#ifndef INCGUARD_MGL_KEYBOARD_KEYCODE_H_1608986800
12#define INCGUARD_MGL_KEYBOARD_KEYCODE_H_1608986800
13
14#include <array>
15#include <bitset>
16#include <cstdint>
17#include <type_traits>
18
19namespace MGL::Input
20{
22enum class Keycode : uint8_t
23{
24 Invalid,
25 KeyA,
26 KeyB,
27 KeyC,
28 KeyD,
29 KeyE,
30 KeyF,
31 KeyG,
32 KeyH,
33 KeyI,
34 KeyJ,
35 KeyK,
36 KeyL,
37 KeyM,
38 KeyN,
39 KeyO,
40 KeyP,
41 KeyQ,
42 KeyR,
43 KeyS,
44 KeyT,
45 KeyU,
46 KeyV,
47 KeyW,
48 KeyX,
49 KeyY,
50 KeyZ,
51 Key1,
52 Key2,
53 Key3,
54 Key4,
55 Key5,
56 Key6,
57 Key7,
58 Key8,
59 Key9,
60 Key0,
61 Return,
62 Escape,
63 Backspace,
64 Tab,
65 Space,
66 F1,
67 F2,
68 F3,
69 F4,
70 F5,
71 F6,
72 F7,
73 F8,
74 F9,
75 F10,
76 F11,
77 F12,
78 Delete,
79 Right,
80 Left,
81 Down,
82 Up,
84 LeftShift,
85 LeftAlt,
86 LeftGUI,
89 RightAlt,
90 RightGUI,
91 Control,
92 Shift,
93 Alt,
94 GUI,
95};
96
98constexpr auto kKeycodeCount = static_cast<size_t>(Keycode::GUI) + 1;
99
101using KeycodeArray = std::bitset<kKeycodeCount>;
102} // namespace MGL::Input
103#endif // INCGUARD_MGL_KEYBOARD_KEYCODE_H_1608986800
104
105// vim: et ts=4 sw=4 sts=4
@ Invalid
無効値
Keycode
キーボード用コード
Definition mgl_keyboard_keycode.h:23
@ GUI
Command or Windowsキー(左右共通)
@ Shift
Shiftキー(左右共通)
@ RightGUI
右Command or 右Windows
@ LeftAlt
左Option or 左Alt
@ Return
Return or Enter
@ Control
Ctrlキー(左右共通)
@ Alt
Option or Altキー(左右共通)
@ LeftGUI
左Command or 左Windows
@ Backspace
Backspace
@ RightAlt
右Option or 右Alt
std::bitset< kKeycodeCount > KeycodeArray
キーコード用配列のエイリアス
Definition mgl_keyboard_keycode.h:101
constexpr auto kKeycodeCount
有効なキーコードの数
Definition mgl_keyboard_keycode.h:98