aboutsummaryrefslogtreecommitdiff
path: root/include/cru/platform/native/keyboard.hpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-06-28 00:03:11 +0800
committercrupest <crupest@outlook.com>2020-06-28 00:03:11 +0800
commit06d1d0442276a05b6caad6e3468f4afb1e8ee5df (patch)
treeebd46f0fb7343dc57bf947b7b5fffc139c3ddeac /include/cru/platform/native/keyboard.hpp
parente11be6caa9ef9b2b198ca61846e32f469627556e (diff)
downloadcru-06d1d0442276a05b6caad6e3468f4afb1e8ee5df.tar.gz
cru-06d1d0442276a05b6caad6e3468f4afb1e8ee5df.tar.bz2
cru-06d1d0442276a05b6caad6e3468f4afb1e8ee5df.zip
...
Diffstat (limited to 'include/cru/platform/native/keyboard.hpp')
-rw-r--r--include/cru/platform/native/keyboard.hpp120
1 files changed, 0 insertions, 120 deletions
diff --git a/include/cru/platform/native/keyboard.hpp b/include/cru/platform/native/keyboard.hpp
deleted file mode 100644
index 26a1409d..00000000
--- a/include/cru/platform/native/keyboard.hpp
+++ /dev/null
@@ -1,120 +0,0 @@
-#pragma once
-#include "cru/common/Bitmask.hpp"
-
-namespace cru::platform::native {
-// Because of the complexity of keyboard layout, I only add code in US keyboard
-// layout, the most widely used layout in China. We should try to make it easy
-// to add new keyboard layout.
-enum class KeyCode {
- Unknown,
- LeftButton,
- MiddleButton,
- RightButton,
- Escape,
- F1,
- F2,
- F3,
- F4,
- F5,
- F6,
- F7,
- F8,
- F9,
- F10,
- F11,
- F12,
- N0,
- N1,
- N2,
- N3,
- N4,
- N5,
- N6,
- N7,
- N8,
- N9,
- A,
- B,
- C,
- D,
- E,
- F,
- G,
- H,
- I,
- J,
- K,
- L,
- M,
- N,
- O,
- P,
- Q,
- R,
- S,
- T,
- U,
- V,
- W,
- X,
- Y,
- Z,
- GraveAccent,
- Tab,
- CapsLock,
- LeftShift,
- LeftCtrl,
- LeftSuper,
- LeftAlt,
- Minus,
- Equal,
- Backspace,
- LeftSquareBracket,
- RightSquareBracket,
- BackSlash,
- Semicolon,
- Quote,
- Comma,
- Period,
- Slash,
- RightShift,
- RightCtrl,
- RightSuper,
- RightAlt,
- Insert,
- Delete,
- Home,
- End,
- PageUp,
- PageDown,
- Up,
- Left,
- Down,
- Right,
- PrintScreen,
- ScrollLock,
- Pause,
- NumPad0,
- NumPad1,
- NumPad2,
- NumPad3,
- NumPad4,
- NumPad5,
- NumPad6,
- NumPad7,
- NumPad8,
- NumPad9
-};
-
-namespace details {
-struct TagKeyModifier {};
-} // namespace details
-
-using KeyModifier = Bitmask<details::TagKeyModifier>;
-
-namespace key_modifiers {
-constexpr KeyModifier shift{0b1};
-constexpr KeyModifier ctrl{0b10};
-constexpr KeyModifier alt{0b100};
-} // namespace key_modifiers
-} // namespace cru::platform::native