aboutsummaryrefslogtreecommitdiff
path: root/include/cru/platform/gui
diff options
context:
space:
mode:
Diffstat (limited to 'include/cru/platform/gui')
-rw-r--r--include/cru/platform/gui/Keyboard.hpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/cru/platform/gui/Keyboard.hpp b/include/cru/platform/gui/Keyboard.hpp
index 926b8d91..347b57bc 100644
--- a/include/cru/platform/gui/Keyboard.hpp
+++ b/include/cru/platform/gui/Keyboard.hpp
@@ -125,8 +125,15 @@ struct KeyModifiers {
static constexpr KeyModifier shift{0b1};
static constexpr KeyModifier ctrl{0b10};
static constexpr KeyModifier alt{0b100};
+ static constexpr KeyModifier command{0b1000};
};
+#ifdef CRU_PLATFORM_OSX
+constexpr KeyModifier kKeyModifierCommand = KeyModifiers::command;
+#else
+constexpr KeyModifier kKeyModifierCommand = KeyModifiers::ctrl;
+#endif
+
CRU_PLATFORM_GUI_API String ToString(KeyCode key_code);
CRU_PLATFORM_GUI_API String ToString(KeyModifier key_modifier,
StringView separator = u"+");