4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * Keyboard modifier state representation.
11 * Full author contact details are available in file CREDITS.
19 /// modifier key states
22 NoModifier
= 0, //< no modifiers held
23 ControlModifier
= 1, //< control button held
24 AltModifier
= 2, //< alt/meta key held
25 ShiftModifier
= 4 //< shift key held
29 inline KeyModifier
operator|(KeyModifier s1
, KeyModifier s2
)
31 int const i1
= static_cast<int>(s1
);
32 int const i2
= static_cast<int>(s2
);
33 return static_cast<KeyModifier
>(i1
| i2
);
37 inline void operator|=(KeyModifier
& s1
, KeyModifier s2
)
39 s1
= static_cast<KeyModifier
>(s1
| s2
);
45 #endif // KEYMODIFIER_H