From 554fccf110ac51e2da3338339b75ccdd8bb5d4af Mon Sep 17 00:00:00 2001 From: chengchen Date: Tue, 29 Jul 2025 11:07:43 +0800 Subject: [PATCH] fix: correct spelling errors in comments and log messages - Fix "occured" to "occurred" in key command handler log messages - Fix "retriction" to "restriction" in key shortcut manager comment These corrections improve code documentation quality and maintain professional standards throughout the codebase. Signed-off-by: chengchen --- service/key_command/src/key_command_handler.cpp | 4 ++-- service/subscriber/src/key_shortcut_manager.cpp | 2 +- .../touch_event_normalize/src/touch_transform_processor.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/service/key_command/src/key_command_handler.cpp b/service/key_command/src/key_command_handler.cpp index 83ae36b0c6..086f8625b3 100644 --- a/service/key_command/src/key_command_handler.cpp +++ b/service/key_command/src/key_command_handler.cpp @@ -1406,10 +1406,10 @@ bool KeyCommandHandler::PreHandleEvent(const std::shared_ptr key) { CHKPF(key); if (EventLogHelper::IsBetaVersion() && !key->HasFlag(InputEvent::EVENT_FLAG_PRIVACY_MODE)) { - MMI_HILOGD("KeyEvent occured. code:%{private}d, keyAction:%{public}d", + MMI_HILOGD("KeyEvent occurred. code:%{private}d, keyAction:%{public}d", key->GetKeyCode(), key->GetKeyAction()); } else { - MMI_HILOGD("KeyEvent occured. code:%{private}d, keyAction:%{public}d", + MMI_HILOGD("KeyEvent occurred. code:%{private}d, keyAction:%{public}d", key->GetKeyCode(), key->GetKeyAction()); } if (key->GetKeyCode() == KeyEvent::KEYCODE_F1) { diff --git a/service/subscriber/src/key_shortcut_manager.cpp b/service/subscriber/src/key_shortcut_manager.cpp index 72557c815f..f699ffb55f 100644 --- a/service/subscriber/src/key_shortcut_manager.cpp +++ b/service/subscriber/src/key_shortcut_manager.cpp @@ -534,7 +534,7 @@ bool KeyShortcutManager::HaveRegisteredGlobalKey(const KeyShortcut &key) const // treat left/right CTRL/SHIFT/ALT/LOGO as different keys. That means, for 'CTRL+A' etc // to work as expected, we have to subscribe both 'LEFT-CTRL+A' and 'RIGHT-CTRL+A'. // But duplicate global key registration will fail according to key-shortcut rules. - // We relax this retriction here to allow duplicate global key registration from same application. + // We relax this restriction here to allow duplicate global key registration from same application. return (iter != shortcuts_.cend() ? (iter->second.session != key.session) : false); } diff --git a/service/touch_event_normalize/src/touch_transform_processor.cpp b/service/touch_event_normalize/src/touch_transform_processor.cpp index b752299fc6..7038777ff0 100644 --- a/service/touch_event_normalize/src/touch_transform_processor.cpp +++ b/service/touch_event_normalize/src/touch_transform_processor.cpp @@ -102,7 +102,7 @@ bool TouchTransformProcessor::OnEventTouchDown(struct libinput_event *event) double pressure = libinput_event_touch_get_pressure(touch); int32_t seatSlot = libinput_event_touch_get_seat_slot(touch); // we clean up pointerItem's cancel mark at down stage to ensure newer event - // always starts with a clean and inital state + // always starts with a clean and initial state if (pointerItemCancelMarks_.find(seatSlot) != pointerItemCancelMarks_.end()) { pointerItemCancelMarks_.erase(seatSlot); } -- Gitee