3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * Keyboard modifier state representation.
10 * Full author contact details are available in file CREDITS
16 /// modifier key states
17 namespace key_modifier {
19 none = 0, //< no modifiers held
20 ctrl = 1, //< control button held
21 alt = 2, //< alt/meta key held
22 shift = 4 //< shift key held
26 inline state operator|(state const & s1, state const & s2)
28 int const i1(static_cast<int>(s1));
29 int const i2(static_cast<int>(s2));
30 return static_cast<state>(i1 | i2);
34 inline void operator|=(state & s1, state s2)
36 s1 = static_cast<state>(s1 | s2);
39 } // namespace key_modifier