mirror of
https://github.com/openharmony/miscservices_inputmethod.git
synced 2026-07-22 08:25:20 -04:00
解决没有绑定输入法时,还消费物理按键的问题
Signed-off-by: zhouyongfei <zhouyongfei@huawei.com>
This commit is contained in:
@@ -138,6 +138,11 @@ namespace MiscServices {
|
||||
OnInitInputControlChannel(msg);
|
||||
break;
|
||||
}
|
||||
case MSG_ID_SET_CLIENT_STATE: {
|
||||
MessageParcel *data = msg->msgContent_;
|
||||
isBindClient = data->ReadBool();
|
||||
break;
|
||||
}
|
||||
case MSG_ID_START_INPUT: {
|
||||
OnStartInput(msg);
|
||||
break;
|
||||
@@ -252,6 +257,10 @@ namespace MiscServices {
|
||||
{
|
||||
IMSA_HILOGI("InputMethodAbility::DispatchKeyEvent");
|
||||
IMSA_HILOGI("InputMethodAbility::DispatchKeyEvent: key = %{public}d, status = %{public}d", keyCode, keyStatus);
|
||||
if (!isBindClient) {
|
||||
IMSA_HILOGI("InputMethodAbility::DispatchKeyEvent abort. no client");
|
||||
return false;
|
||||
}
|
||||
return imeListener_->OnKeyEvent(keyCode, keyStatus);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user