diff options
author | crupest <crupest@outlook.com> | 2021-11-17 19:41:39 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-11-17 19:41:39 +0800 |
commit | 0f3e84f0ef4c62d20e5cb4d9e5677ec39afb894d (patch) | |
tree | d1f4c0686fd12f82b8af5b3ca015b5d995d773ff /include/cru/platform/gui | |
parent | 7be210036e363f2105ace761451448507d4b06d8 (diff) | |
download | cru-0f3e84f0ef4c62d20e5cb4d9e5677ec39afb894d.tar.gz cru-0f3e84f0ef4c62d20e5cb4d9e5677ec39afb894d.tar.bz2 cru-0f3e84f0ef4c62d20e5cb4d9e5677ec39afb894d.zip |
...
Diffstat (limited to 'include/cru/platform/gui')
-rw-r--r-- | include/cru/platform/gui/Keyboard.hpp | 7 |
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"+"); |