aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-03-27 23:48:45 +0800
committercrupest <crupest@outlook.com>2020-03-27 23:48:45 +0800
commit671860a02aa1ecc41eac1cf1e0f28c504bf9c37c (patch)
tree5e43d21c381f7ed764fad08b545f6e70fb6c97bd
parent58f7a808f62af4a3ca3cde1c4040d8a8ad0bb159 (diff)
downloadcru-671860a02aa1ecc41eac1cf1e0f28c504bf9c37c.tar.gz
cru-671860a02aa1ecc41eac1cf1e0f28c504bf9c37c.tar.bz2
cru-671860a02aa1ecc41eac1cf1e0f28c504bf9c37c.zip
...
-rw-r--r--include/cru/platform/native/key_code.hpp89
-rw-r--r--src/platform/native/CMakeLists.txt1
2 files changed, 90 insertions, 0 deletions
diff --git a/include/cru/platform/native/key_code.hpp b/include/cru/platform/native/key_code.hpp
new file mode 100644
index 00000000..d4e1ee8f
--- /dev/null
+++ b/include/cru/platform/native/key_code.hpp
@@ -0,0 +1,89 @@
+#pragma once
+
+namespace cru::platform::native {
+enum class KeyCode {
+ LeftButton,
+ MiddleButton,
+ RightButton,
+ Escape,
+ F1,
+ F2,
+ F3,
+ F4,
+ F5,
+ F6,
+ F7,
+ F8,
+ F9,
+ F10,
+ F11,
+ F12,
+ N1,
+ N2,
+ N3,
+ N4,
+ N5,
+ N6,
+ N7,
+ N8,
+ N9,
+ N0,
+ 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,
+ LeftControl,
+ Win,
+ LeftAlt,
+ Minus,
+ Equal,
+ Backspace,
+ LeftSquareBracket,
+ RightSquareBracket,
+ BackSlash,
+ Semicolon,
+ Quote,
+ Comma,
+ Point,
+ Slash,
+ RightShift,
+ RightAlt,
+ RightCtrl,
+ Insert,
+ Delete,
+ Home,
+ End,
+ PageUp,
+ PageDown,
+ Up,
+ Left,
+ Down,
+ Right
+};
+}
diff --git a/src/platform/native/CMakeLists.txt b/src/platform/native/CMakeLists.txt
index 5caf84e4..5150415a 100644
--- a/src/platform/native/CMakeLists.txt
+++ b/src/platform/native/CMakeLists.txt
@@ -5,6 +5,7 @@ add_library(cru_platform_native STATIC
target_sources(cru_platform_native PUBLIC
${CRU_PLATFORM_NATIVE_INCLUDE_DIR}/base.hpp
${CRU_PLATFORM_NATIVE_INCLUDE_DIR}/cursor.hpp
+ ${CRU_PLATFORM_NATIVE_INCLUDE_DIR}/key_code.hpp
${CRU_PLATFORM_NATIVE_INCLUDE_DIR}/window.hpp
${CRU_PLATFORM_NATIVE_INCLUDE_DIR}/ui_application.hpp
)