blob: a232988faf232ad4e550566474093b24878fa366 [file] [log] [blame]
Hidehiko Abe23f5e812020-09-20 02:57:191// 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
Hidehiko Abe22851972020-09-23 23:49:5010#include <tuple>
11
Hidehiko Abe23f5e812020-09-20 02:57:1912namespace exo {
13
14// Represents keyboard modifiers.
15struct KeyboardModifiers {
16 uint32_t depressed;
17 uint32_t locked;
18 uint32_t latched;
19 uint32_t group;
20};
21
Hidehiko Abe22851972020-09-23 23:49:5022inline 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
Hidehiko Abe23f5e812020-09-20 02:57:1928} // namespace exo
29
30#endif // COMPONENTS_EXO_KEYBOARD_MODIFIERS_H_