void CWebHelperAgentWebSocket::handle_recved_message(ISE_MESSAGE &message)
{
+ static bool _key_event_processing = false;
if (message.command.compare(ISE_MESSAGE_COMMAND_STRINGS[ISE_MESSAGE_COMMAND_LOG]) == 0) {
std::string str = "";
for (unsigned int loop = 0;loop < message.values.size();loop++) {
}
log(str.c_str());
} else if (message.command.compare(ISE_MESSAGE_COMMAND_STRINGS[ISE_MESSAGE_COMMAND_COMMIT_STRING]) == 0) {
- send_key_event(0xff6b, 0); // Temporarily reset keyboard engine
-
std::string str = "";
for (unsigned int loop = 0;loop < message.values.size();loop++) {
str += message.values.at(loop).c_str();
str += " ";
}
}
+ if (_key_event_processing) {
+ struct timeval tv;
+ tv.tv_sec = 0;
+ tv.tv_usec = 50000;
+ select(0, NULL, NULL, NULL, &tv);
+ _key_event_processing = false;
+ }
commit_string(str.c_str());
} else if (message.command.compare(ISE_MESSAGE_COMMAND_STRINGS[ISE_MESSAGE_COMMAND_UPDATE_PREEDIT_STRING]) == 0) {
std::string str = "";
update_preedit_string(str.c_str());
} else if (message.command.compare(ISE_MESSAGE_COMMAND_STRINGS[ISE_MESSAGE_COMMAND_SEND_KEY_EVENT]) == 0) {
if (message.values.size() == 1) {
- send_key_event(atoi(message.values.at(0).c_str()), 0);
+ forward_key_event(atoi(message.values.at(0).c_str()));
+ _key_event_processing = true;
}
} else if (message.command.compare(ISE_MESSAGE_COMMAND_STRINGS[ISE_MESSAGE_COMMAND_SET_KEYBOARD_SIZES]) == 0) {
LOGD("ISE_MESSAGE_COMMAND_SET_KEYBOARD_SIZES");