| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/events/base_event_utils.h" | 5 #include "ui/events/base_event_utils.h" |
| 6 | 6 |
| 7 #include "base/atomic_sequence_num.h" | 7 #include "base/atomic_sequence_num.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "ui/events/event_constants.h" | 9 #include "ui/events/event_constants.h" |
| 10 | 10 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 // Set the first touch event ID to 1 because we set id to 0 for other types | 27 // Set the first touch event ID to 1 because we set id to 0 for other types |
| 28 // of events. | 28 // of events. |
| 29 uint32 id = g_next_event_id.GetNext(); | 29 uint32 id = g_next_event_id.GetNext(); |
| 30 if (id == 0) | 30 if (id == 0) |
| 31 id = g_next_event_id.GetNext(); | 31 id = g_next_event_id.GetNext(); |
| 32 DCHECK_NE(0U, id); | 32 DCHECK_NE(0U, id); |
| 33 return id; | 33 return id; |
| 34 } | 34 } |
| 35 | 35 |
| 36 bool IsSystemKeyModifier(int flags) { | 36 bool IsSystemKeyModifier(int flags) { |
| 37 return (kSystemKeyModifierMask & flags) != 0; | 37 // AltGr modifier is used to type alternative keys on certain keyboard layouts |
| 38 // so we don't consider keys with the AltGr modifier as a system key. |
| 39 return (kSystemKeyModifierMask & flags) != 0 && |
| 40 (EF_ALTGR_DOWN & flags) == 0; |
| 38 } | 41 } |
| 39 | 42 |
| 40 } // namespace ui | 43 } // namespace ui |
| 41 | 44 |
| OLD | NEW |