Darren Shen | 62a6e56 | 2023-05-01 06:32:50 | [diff] [blame] | 1 | // Copyright 2023 The Chromium Authors |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #include "ui/base/ime/events.h" |
| 6 | |
| 7 | namespace ui { |
| 8 | namespace { |
| 9 | |
| 10 | // If this property is present, then it means the input field should suppress |
| 11 | // key autorepeat. |
| 12 | constexpr char kPropertySuppressAutoRepeat[] = "suppress_auto_repeat"; |
| 13 | |
| 14 | } // namespace |
| 15 | |
| 16 | bool HasKeyEventSuppressAutoRepeat(const ui::Event::Properties& properties) { |
| 17 | return properties.count(kPropertySuppressAutoRepeat); |
| 18 | } |
| 19 | |
| 20 | void SetKeyEventSuppressAutoRepeat(ui::Event::Properties& properties) { |
| 21 | properties[kPropertySuppressAutoRepeat] = {}; |
| 22 | } |
| 23 | |
| 24 | } // namespace ui |