From 4ac58d91bac0cebe2bdf5e11b9d63b9c41e6b39e Mon Sep 17 00:00:00 2001 From: crupest Date: Mon, 15 Nov 2021 16:26:25 +0800 Subject: ... --- include/cru/ui/helper/ShortcutHub.hpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/cru/ui/helper/ShortcutHub.hpp') diff --git a/include/cru/ui/helper/ShortcutHub.hpp b/include/cru/ui/helper/ShortcutHub.hpp index 7f098a6d..ed90381d 100644 --- a/include/cru/ui/helper/ShortcutHub.hpp +++ b/include/cru/ui/helper/ShortcutHub.hpp @@ -32,6 +32,10 @@ class ShortcutKeyBind { platform::gui::KeyCode GetKey() const { return key_; } platform::gui::KeyModifier GetModifier() const { return modifier_; } + ShortcutKeyBind AddModifier(platform::gui::KeyModifier modifier) const { + return ShortcutKeyBind(key_, modifier_ | modifier); + } + bool Is(platform::gui::KeyCode key, platform::gui::KeyModifier modifier) const { return key == key_ && modifier == modifier_; -- cgit v1.2.3