mirror of
https://github.com/openharmony/miscservices_inputmethod.git
synced 2026-07-19 12:08:05 -04:00
@@ -91,6 +91,7 @@ namespace MiscServices {
|
||||
int mSelectOldEnd = 0;
|
||||
int mSelectNewBegin = 0;
|
||||
int mSelectNewEnd = 0;
|
||||
int mSpecialKeyPress = 0;
|
||||
|
||||
static std::mutex instanceLock_;
|
||||
static sptr<InputMethodController> instance_;
|
||||
|
||||
@@ -357,6 +357,18 @@ using namespace MessageID;
|
||||
if (mImms == nullptr) {
|
||||
return false;
|
||||
}
|
||||
int32_t code = keyEvent->GetKeyCode();
|
||||
int32_t status = keyEvent->GetKeyAction();
|
||||
if (mSpecialKeyPress != 0) {
|
||||
if ((code == MMI::KeyEvent::KEYCODE_CTRL_LEFT || code == MMI::KeyEvent::KEYCODE_CTRL_RIGHT) && status == MMI::KeyEvent::KEY_ACTION_UP) {
|
||||
mSpecailKeyPress--;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if ((code == MMI::KeyEvent::KEYCODE_CTRL_LEFT || code == MMI::KeyEvent::KEYCODE_CTRL_RIGHT) && status == MMI::KeyEvent::KEY_ACTION_DOWN) {
|
||||
mSpecialKeyPress++;
|
||||
return false;
|
||||
}
|
||||
MessageParcel data;
|
||||
if (!(data.WriteInterfaceToken(mImms->GetDescriptor())
|
||||
&& data.WriteRemoteObject(mClient->AsObject().GetRefPtr())
|
||||
|
||||
Reference in New Issue
Block a user