From 122824c9f4b779a339885eaec2b406f252427d22 Mon Sep 17 00:00:00 2001 From: InHong Han Date: Thu, 11 Mar 2021 15:17:03 +0900 Subject: [PATCH] Fix the bug that delimiter character is not entered in Remote Input Change-Id: I07c32f9ae3abb21e92cc9d717cf0c3eb97d5f5ef --- ism/extras/efl_panel/websocketserver.h | 2 +- ism/src/isf_remote_control.cpp | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ism/extras/efl_panel/websocketserver.h b/ism/extras/efl_panel/websocketserver.h index d579ad1..9300cc7 100644 --- a/ism/extras/efl_panel/websocketserver.h +++ b/ism/extras/efl_panel/websocketserver.h @@ -203,7 +203,7 @@ class CISEMessageSerializer { protected: /* FIXME : Temporary solution for distinguish commands and values */ - static const char MESSAGE_DELIMETER = '|'; + static const char MESSAGE_DELIMETER = '\t'; public: static std::string serialize(ISE_MESSAGE message) { diff --git a/ism/src/isf_remote_control.cpp b/ism/src/isf_remote_control.cpp index 57b3d20..948e8ac 100644 --- a/ism/src/isf_remote_control.cpp +++ b/ism/src/isf_remote_control.cpp @@ -14,6 +14,8 @@ #endif #define LOG_TAG "ISF_REMOTE_CONTROL" +#define MESSAGE_DELIMETER "\t" + using namespace scim; static bool focus_flag; @@ -470,7 +472,8 @@ EXAPI int remote_control_send_key_event(remote_control_client *client, remote_co char key_str[12] = {}; snprintf(key_str, sizeof(key_str), "%d", key); - String command = String ("|plain|send_key_event|") + String (key_str) + String ("|"); + String command = String (MESSAGE_DELIMETER) + String ("plain") + String (MESSAGE_DELIMETER) + + String ("send_key_event") + String (MESSAGE_DELIMETER) + String (key_str) + String (MESSAGE_DELIMETER); if (focus_flag) { error_e = (remote_control_error_e)client->remote_client->send_remote_input_message(command.c_str ()); @@ -498,7 +501,8 @@ EXAPI int remote_control_send_commit_string(remote_control_client *client, const return error_e; } - String command = String ("|plain|commit_string|") + String (text) + String ("|"); + String command = String (MESSAGE_DELIMETER) + String ("plain") + String (MESSAGE_DELIMETER) + + String ("commit_string") + String (MESSAGE_DELIMETER) + String (text) + String (MESSAGE_DELIMETER); if (focus_flag) { error_e = (remote_control_error_e)client->remote_client->send_remote_input_message(command.c_str ()); @@ -528,7 +532,8 @@ EXAPI int remote_control_update_preedit_string(remote_control_client *client, co char cursor_position[10] = {}; snprintf(cursor_position, sizeof(cursor_position), "%d", cursor_pos); - String command = String ("|plain|update_preedit_string|") + String (text) + String ("|") + String (cursor_position) + String ("|"); + String command = String (MESSAGE_DELIMETER) + String ("plain") + String (MESSAGE_DELIMETER) +String ("update_preedit_string") + + String (MESSAGE_DELIMETER) + String (text) + String (MESSAGE_DELIMETER) + String (cursor_position) + String (MESSAGE_DELIMETER); if (focus_flag) { error_e = (remote_control_error_e)client->remote_client->send_remote_input_message(command.c_str ()); -- 2.7.4