mirror of
https://github.com/debauchee/barrier.git
synced 2026-02-08 12:53:53 +08:00
added other mouse and key event handling to CXScreen. key repeat
isn't implemented and modifier masks are ignored. modifier masks are new; they indicate the modifier key (shift, ctrl, etc) state at the time of the key event.
This commit is contained in:
18
KeyTypes.h
18
KeyTypes.h
@@ -4,15 +4,19 @@
|
||||
// type to hold a key identifier
|
||||
typedef UInt32 KeyID;
|
||||
|
||||
// type to hold bitmask of keys that have toggle states
|
||||
typedef UInt16 KeyToggleMask;
|
||||
|
||||
// toggle key bitmasks
|
||||
static const UInt32 KeyToggleShiftLock = 0x0001;
|
||||
static const UInt32 KeyToggleNumLock = 0x0002;
|
||||
static const UInt32 KeyToggleScrollLock = 0x0004;
|
||||
// type to hold bitmask of key modifiers (i.e. shift keys)
|
||||
typedef UInt32 KeyModifierMask;
|
||||
|
||||
// key codes
|
||||
static const KeyID kKeyNone = 0;
|
||||
|
||||
// modifier key bitmasks
|
||||
static const KeyModifierMask KeyModifierShift = 0x0001;
|
||||
static const KeyModifierMask KeyModifierControl = 0x0002;
|
||||
static const KeyModifierMask KeyModifierAlt = 0x0004;
|
||||
static const KeyModifierMask KeyModifierMeta = 0x0008;
|
||||
static const KeyModifierMask KeyModifierCapsLock = 0x1000;
|
||||
static const KeyModifierMask KeyModifierNumLock = 0x2000;
|
||||
static const KeyModifierMask KeyModifierScrollLock = 0x4000;
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user