mirror of
https://github.com/XITRIX/NXKit.git
synced 2026-05-30 11:46:52 +00:00
34 lines
654 B
C++
34 lines
654 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
#include <UIKeyboardHIDUsage.h>
|
|
#include <tools/Tools.hpp>
|
|
|
|
namespace NXKit {
|
|
|
|
enum class UIKeyModifierFlags {
|
|
alphaShift = 1 << 0,
|
|
shift = 1 << 1,
|
|
control = 1 << 2,
|
|
alternate = 1 << 3,
|
|
command = 1 << 4,
|
|
numericPad = 1 << 5,
|
|
};
|
|
|
|
struct UIKey {
|
|
public:
|
|
std::string characters() { return _characters; }
|
|
OptionSet<UIKeyModifierFlags> modifierFlags() { return _modifierFlags; }
|
|
UIKeyboardHIDUsage keyCode() { return _keyCode; }
|
|
|
|
private:
|
|
std::string _characters;
|
|
OptionSet<UIKeyModifierFlags> _modifierFlags;
|
|
UIKeyboardHIDUsage _keyCode;
|
|
|
|
friend class UIApplication;
|
|
};
|
|
|
|
}
|
|
|