1 // Copyright 2020 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef COMPONENTS_EXO_KEYBOARD_MODIFIERS_H_ 6 #define COMPONENTS_EXO_KEYBOARD_MODIFIERS_H_ 7 8 #include <stdint.h> 9 10 #include <tuple> 11 12 namespace exo { 13 14 // Represents keyboard modifiers. 15 struct KeyboardModifiers { 16 uint32_t depressed; 17 uint32_t locked; 18 uint32_t latched; 19 uint32_t group; 20 }; 21 22 inline bool operator==(const KeyboardModifiers& lhs, 23 const KeyboardModifiers& rhs) { 24 return std::tie(lhs.depressed, lhs.locked, lhs.latched, lhs.group) == 25 std::tie(rhs.depressed, rhs.locked, rhs.latched, rhs.group); 26 } 27 28 } // namespace exo 29 30 #endif // COMPONENTS_EXO_KEYBOARD_MODIFIERS_H_ 31