fixup! [M120 Migration][Remote Access] Fix press "space" key not work issue. 64/320664/2
authorchenshurong <shurong.chen@samsung.com>
Wed, 20 Nov 2024 08:20:33 +0000 (16:20 +0800)
committerBot Blink <blinkbot@samsung.com>
Thu, 21 Nov 2024 07:02:22 +0000 (07:02 +0000)
Office 365 have the issue:
A sentence typed has "space", text will be disappear after change line.

It's because Office 365 website need handle "space" key to sync online;
while the "space" key been filtered by IME, IME commit it as " " text,
and the keycode of the " " is 229.
It cause Office 365 website can not distinguish the "space" key.

Current the keycode of "space" is 32, it is consistent with "space" key,
so convert " " to "space" key to fix the issue.

Change-Id: Ifa528e0792e69ffd0714ae40c2bd0b362e08b599
Signed-off-by: chenshurong <shurong.chen@samsung.com>
tizen_src/chromium_impl/ui/ozone/platform/efl/im_context_efl.cc

index 68ae6df6dba87c4ecf07bab3f893ee67904cceaa..e4fc84ccd758aebd85d2a06a2693e3e3c7c5b49c 100644 (file)
@@ -505,6 +505,14 @@ void IMContextEfl::OnCommit(void* event_info) {
 void IMContextEfl::SendFakeCompositionKeyEvent(const std::u16string& buf) {
   std::string str = base::UTF16ToUTF8(buf);
 
+#if BUILDFLAG(IS_TIZEN_TV)
+  // We should process both " " and "space" which IME sends.
+  // Otherwise " " would be received by engine and cause unnecessary page
+  // scroll.
+  if (str == " ")
+    str = "space";
+#endif
+
   Evas_Event_Key_Down downEvent;
   memset(&downEvent, 0, sizeof(Evas_Event_Key_Down));
   downEvent.key = str.c_str();