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.
17 /// modifier key states
18 namespace key_modifier {
20 none = 0, //< no modifiers held
21 ctrl = 1, //< control button held
22 alt = 2, //< alt/meta key held
23 shift = 4 //< shift key held
27 inline state operator|(state const & s1, state const & s2)
29 int const i1(static_cast<int>(s1));
30 int const i2(static_cast<int>(s2));
31 return static_cast<state>(i1 | i2);
35 inline void operator|=(state & s1, state s2)
37 s1 = static_cast<state>(s1 | s2);
40 } // namespace key_modifier