From 182b9991ff42359f1dc6e5dfd472ca405d7db01c Mon Sep 17 00:00:00 2001 From: mayunteng_1 Date: Tue, 7 May 2024 07:13:44 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8F=8C=E5=87=BB=E7=94=B5?= =?UTF-8?q?=E6=BA=90=E9=94=AE=E6=97=A0=E6=B3=95=E6=8B=89=E8=B5=B7=E9=92=B1?= =?UTF-8?q?=E5=8C=85=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: mayunteng_1 Change-Id: I259e27b9e40795521d3a72f728e0ecb1e578fd16 --- service/key_command/include/key_command_handler.h | 2 ++ service/key_command/src/key_command_handler.cpp | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/service/key_command/include/key_command_handler.h b/service/key_command/include/key_command_handler.h index e3004e2349..b3154f8631 100755 --- a/service/key_command/include/key_command_handler.h +++ b/service/key_command/include/key_command_handler.h @@ -288,6 +288,8 @@ private: bool isDownStart_ { false }; bool isKeyCancel_ { false }; bool isHandleSequence_ { false }; + bool isParseMaxCount_ { false }; + bool isParseStatusConfig_ { false }; bool isDoubleClick_ { false }; }; } // namespace MMI diff --git a/service/key_command/src/key_command_handler.cpp b/service/key_command/src/key_command_handler.cpp index 124cb6c3be..378d693035 100644 --- a/service/key_command/src/key_command_handler.cpp +++ b/service/key_command/src/key_command_handler.cpp @@ -812,6 +812,17 @@ bool KeyCommandHandler::PreHandleEvent(const std::shared_ptr key) } isParseConfig_ = true; } + if (!isParseMaxCount_) { + ParseRepeatKeyMaxCount(); + isParseMaxCount_ = true; + if (repeatKeys_.size() > 0) { + intervalTime_ = repeatKeys_[0].delay; + } + } + if (!isParseStatusConfig_) { + ParseStatusConfigObserver(); + isParseStatusConfig_ = true; + } return true; } -- Gitee