Disable repeat to keyboard keys default if these are handled by keyrouter 90/68290/1 accepted/tizen/common/20160504.130113 accepted/tizen/ivi/20160504.011919 accepted/tizen/mobile/20160504.011831 accepted/tizen/tv/20160504.011846 accepted/tizen/wearable/20160504.011900 submit/tizen/20160503.095918
authorJengHyun Kang <jhyuni.kang@samsung.com>
Tue, 3 May 2016 08:37:08 +0000 (17:37 +0900)
committerJengHyun Kang <jhyuni.kang@samsung.com>
Tue, 3 May 2016 08:37:08 +0000 (17:37 +0900)
cache/cache.c

index ac287b3b8885864c0a19d93fb9fa48c70938c8f1..85d33d6dea25f3d9608f77a2802e2b0d3e1ae303 100644 (file)
@@ -33,15 +33,28 @@ void parseKeymapFile(struct xkb_keymap *map)
 
         if (!ret) continue;
 
-        if ((strstr(buf, "keyboard") > 0) && (strstr(buf, "repeat") > 0))
+        if (strstr(buf, "keyboard") > 0)
         {
-           tmp = strtok(buf, " ");
-           tmp = strtok(NULL, " ");
-           if (!tmp) continue;
-           keycode = atoi(tmp) + 8;
+            if (strstr(buf, "repeat") > 0)
+            {
+                tmp = strtok(buf, " ");
+                tmp = strtok(NULL, " ");
+                if (!tmp) continue;
+                keycode = atoi(tmp) + 8;
 
-           res = xkb_keymap_key_set_repeats(map, keycode, 1);
-           printf("Set key(%d) to enable repeat: %d\n", keycode, res);
+                res = xkb_keymap_key_set_repeats(map, keycode, 1);
+                printf("Set key(%d) to enable repeat: %d\n", keycode, res);
+            }
+            else
+            {
+                tmp = strtok(buf, " ");
+                tmp = strtok(NULL, " ");
+                if (!tmp) continue;
+                keycode = atoi(tmp) + 8;
+
+                res = xkb_keymap_key_set_repeats(map, keycode, 0);
+                printf("Set key(%d) to disable repeat: %d\n", keycode, res);
+            }
         }
     }