Not to send unnecessary shift key event 38/216238/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Tue, 22 Oct 2019 11:21:15 +0000 (20:21 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Tue, 22 Oct 2019 11:21:15 +0000 (20:21 +0900)
Change-Id: I5677e063277ad1275436bc8a403ccfff518e407b
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
src/ise.cpp

index 748587d..5f52222 100644 (file)
@@ -323,10 +323,13 @@ static void set_caps_mode(sclboolean mode) {
         if (g_ui->get_shift_state() != SCL_SHIFT_STATE_LOCK) {
             g_ui->set_shift_state(mode ? SCL_SHIFT_STATE_ON : SCL_SHIFT_STATE_OFF);
             g_ui->set_autocapital_shift_state(!mode);
-            if (mode) {
-                ise_send_event(MVK_Shift_On, KEY_MASK_NULL);
-            } else {
-                ise_send_event(MVK_Shift_Off, KEY_MASK_NULL);
+
+            if (g_config_values.prediction_on) {
+                if (mode) {
+                    ise_send_event(MVK_Shift_On, KEY_MASK_NULL);
+                } else {
+                    ise_send_event(MVK_Shift_Off, KEY_MASK_NULL);
+                }
             }
         }
     }