3 * Copyright 2002 the LyX Team
4 * Read the file COPYING
6 * Keyboard modifier state representation.
8 * \author John Levon <moz@compsoc.man.ac.uk>
14 /// modifier key states
15 namespace key_modifier {
17 none = 0, //< no modifiers held
18 ctrl = 1, //< control button held
19 alt = 2, //< alt/meta key held
20 shift = 4 //< shift key held
24 inline state operator|(state const & s1, state const & s2)
26 int const i1(static_cast<int>(s1));
27 int const i2(static_cast<int>(s2));
28 return static_cast<state>(i1 | i2);
32 inline void operator|=(state & s1, state s2)
34 s1 = static_cast<state>(s1 | s2);
37 } // namespace key_modifier