}
}
- if (message.command.compare(ISE_MESSAGE_COMMAND_STRINGS[ISE_MESSAGE_COMMAND_LOG]) == 0) {
+ else if (message.command.compare(ISE_MESSAGE_COMMAND_STRINGS[ISE_MESSAGE_COMMAND_LOG]) == 0) {
if (message.values.size() == 1) {
LOGD("Web_page LOG: %s", message.values.at(0).c_str());
}
}
- if (message.command.compare(ISE_MESSAGE_COMMAND_STRINGS[ISE_MESSAGE_COMMAND_COMMIT_STRING]) == 0) {
+ else if (message.command.compare(ISE_MESSAGE_COMMAND_STRINGS[ISE_MESSAGE_COMMAND_COMMIT_STRING]) == 0) {
if (message.values.size() == 1) {
LOGD( "commit_str:|%s|", message.values.at(0).c_str());
_info_manager->remoteinput_commit_string(utf8_mbstowcs((char*)message.values.at(0).c_str()));
+ _info_manager->remoteinput_forward_key_event(KeyEvent(SCIM_KEY_NullKey, SCIM_KEY_ReleaseMask));
}
}
- if (message.command.compare(ISE_MESSAGE_COMMAND_STRINGS[ISE_MESSAGE_COMMAND_UPDATE_PREEDIT_STRING]) == 0) {
+ else if (message.command.compare(ISE_MESSAGE_COMMAND_STRINGS[ISE_MESSAGE_COMMAND_UPDATE_PREEDIT_STRING]) == 0) {
AttributeList attrs;
attrs.push_back(Attribute(0, utf8_mbstowcs((char*)message.values.at(0).c_str()).length(), SCIM_ATTR_DECORATE, SCIM_ATTR_DECORATE_UNDERLINE));
int caret = atoi(message.values.at(1).c_str());
LOGD ("preedit:|%s|, caret = %d", message.values.at(0).c_str(), caret);
_info_manager->remoteinput_update_preedit_string(utf8_mbstowcs((char*)message.values.at(0).c_str()), attrs, (uint32) caret);
+ _info_manager->remoteinput_forward_key_event(KeyEvent(SCIM_KEY_NullKey, SCIM_KEY_ReleaseMask));
} else {
_info_manager->remoteinput_update_preedit_string(L"", attrs, 0);
+ _info_manager->remoteinput_forward_key_event(KeyEvent(SCIM_KEY_NullKey, SCIM_KEY_ReleaseMask));
}
}
- if (message.command.compare(ISE_MESSAGE_COMMAND_STRINGS[ISE_MESSAGE_COMMAND_SEND_MOUSE_KEY]) == 0) {
+ else if (message.command.compare(ISE_MESSAGE_COMMAND_STRINGS[ISE_MESSAGE_COMMAND_SEND_MOUSE_KEY]) == 0) {
if (message.values.size() == 1) {
int e = atoi(message.values.at(0).c_str());
if (e == 555) {
}
}
- if (message.command.compare(ISE_MESSAGE_COMMAND_STRINGS[ISE_MESSAGE_COMMAND_SEND_MOUSE_MOVE]) == 0) {
+ else if (message.command.compare(ISE_MESSAGE_COMMAND_STRINGS[ISE_MESSAGE_COMMAND_SEND_MOUSE_MOVE]) == 0) {
if (message.values.size() == 1) {
std::size_t tmp_offset = message.values.at(0).find(',');
int x = atoi(message.values.at(0).substr(0, tmp_offset).c_str());
}
}
- if (message.command.compare(ISE_MESSAGE_COMMAND_STRINGS[ISE_MESSAGE_COMMAND_SEND_WHEEL_MOVE]) == 0) {
+ else if (message.command.compare(ISE_MESSAGE_COMMAND_STRINGS[ISE_MESSAGE_COMMAND_SEND_WHEEL_MOVE]) == 0) {
if (message.values.size() == 1) {
std::size_t tmp_offset = message.values.at(0).find(',');
//int x = atoi(message.values.at(0).substr(0, tmp_offset).c_str());