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
20 namespace key_modifier {
23 none = 0, //< no modifiers held
24 ctrl = 1, //< control button held
25 alt = 2, //< alt/meta key held
26 shift = 4 //< shift key held
30 inline state operator|(state const & s1, state const & s2)
32 int const i1 = static_cast<int>(s1);
33 int const i2 = static_cast<int>(s2);
34 return static_cast<state>(i1 | i2);
38 inline void operator|=(state & s1, state s2)
40 s1 = static_cast<state>(s1 | s2);
43 } // namespace key_modifier