KeySound 智慧语音按键适配

Signed-off-by: y30027424 <yaowentao6@huawei.com>
This commit is contained in:
y30027424 2024-08-08 17:15:20 +08:00
parent 16148dad5e
commit 7dd3b43d5a
3 changed files with 6 additions and 3 deletions

View File

@ -378,8 +378,9 @@ bool IntentionEventManager::InputEventListener::IsKeyboardEvent(
bool isKeyFN = (keyCode == MMI::KeyEvent::KEYCODE_FN);
bool isKeyBack = (keyCode == MMI::KeyEvent::KEYCODE_BACK);
bool isKeyboard = (keyCode >= MMI::KeyEvent::KEYCODE_0 && keyCode <= MMI::KeyEvent::KEYCODE_NUMPAD_RIGHT_PAREN);
bool isKeySound = (keyCode == MMI::KeyEvent::KEYCODE_SOUND);
TLOGI(WmsLogTag::WMS_EVENT, "isKeyFN: %{public}d, isKeyboard: %{public}d", isKeyFN, isKeyboard);
return (isKeyFN || isKeyboard || isKeyBack);
return (isKeyFN || isKeyboard || isKeyBack || isKeySound);
}
void IntentionEventManager::InputEventListener::OnInputEvent(

View File

@ -172,8 +172,9 @@ bool WindowInputChannel::IsKeyboardEvent(const std::shared_ptr<MMI::KeyEvent>& k
bool isKeyFN = (keyCode == MMI::KeyEvent::KEYCODE_FN);
bool isKeyBack = (keyCode == MMI::KeyEvent::KEYCODE_BACK);
bool isKeyboard = (keyCode >= MMI::KeyEvent::KEYCODE_0 && keyCode <= MMI::KeyEvent::KEYCODE_NUMPAD_RIGHT_PAREN);
bool isKeySound = (keyCode == MMI::KeyEvent::KEYCODE_SOUND);
WLOGI("isKeyFN: %{public}d, isKeyboard: %{public}d", isKeyFN, isKeyboard);
return (isKeyFN || isKeyboard || isKeyBack);
return (isKeyFN || isKeyboard || isKeyBack || isKeySound);
}
}
}

View File

@ -3080,8 +3080,9 @@ bool WindowSessionImpl::IsKeyboardEvent(const std::shared_ptr<MMI::KeyEvent>& ke
bool isKeyFN = (keyCode == MMI::KeyEvent::KEYCODE_FN);
bool isKeyBack = (keyCode == MMI::KeyEvent::KEYCODE_BACK);
bool isKeyboard = (keyCode >= MMI::KeyEvent::KEYCODE_0 && keyCode <= MMI::KeyEvent::KEYCODE_NUMPAD_RIGHT_PAREN);
bool isKeySound = (keyCode == MMI::KeyEvent::KEYCODE_SOUND);
WLOGD("isKeyFN: %{public}d, isKeyboard: %{public}d", isKeyFN, isKeyboard);
return (isKeyFN || isKeyboard || isKeyBack);
return (isKeyFN || isKeyboard || isKeyBack || isKeySound);
}
void WindowSessionImpl::RequestVsync(const std::shared_ptr<VsyncCallback>& vsyncCallback)