blob: 49c2bb8366fba6d6bef1cfec258f78baf1c86e23 [file] [log] [blame]
Darren Shen62a6e562023-05-01 06:32:501// 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
7namespace ui {
8namespace {
9
10// If this property is present, then it means the input field should suppress
11// key autorepeat.
12constexpr char kPropertySuppressAutoRepeat[] = "suppress_auto_repeat";
13
14} // namespace
15
16bool HasKeyEventSuppressAutoRepeat(const ui::Event::Properties& properties) {
17 return properties.count(kPropertySuppressAutoRepeat);
18}
19
20void SetKeyEventSuppressAutoRepeat(ui::Event::Properties& properties) {
21 properties[kPropertySuppressAutoRepeat] = {};
22}
23
24} // namespace ui