From 9311178b1ba2517a4939c5ae4b7c5b128fe95e50 Mon Sep 17 00:00:00 2001 From: Mel Date: Fri, 4 Sep 2026 01:29:13 +0200 Subject: Allow unmapped keys from GLFW (it sometimes also doesn't know what's going on) Signed-off-by: Mel --- src/Input.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/Input.hpp') diff --git a/src/Input.hpp b/src/Input.hpp index b6f24b6..98d8691 100644 --- a/src/Input.hpp +++ b/src/Input.hpp @@ -13,6 +13,7 @@ namespace MC { // TODO: Add some more keys. // TODO: I think some of these keys are "modifiers" under GLFW, and should be handled differently. enum class Key { + Unknown, 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, Zero, One, Two, Three, Four, Five, Six, Seven, Eight, Nine, @@ -21,14 +22,15 @@ enum class Key { Space, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, }; -constexpr USize KeyCount = 65; +constexpr USize KeyCount = 66; static_assert(KeyCount == TO(USize, Key::F12) + 1, "Key count mismatch."); enum class Mouse { + Unknown, Left, Right, Middle, }; -constexpr USize MouseCount = 3; +constexpr USize MouseCount = 4; static_assert(MouseCount == TO(USize, Mouse::Middle) + 1, "Mouse count mismatch."); // The simple input system. -- cgit v1.3.1