summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJengHyun Kang <jhyuni.kang@samsung.com>2016-05-03 17:37:08 +0900
committerJengHyun Kang <jhyuni.kang@samsung.com>2016-05-03 17:37:08 +0900
commit34c4cad816342eae566ef70ad9652fe1b4d56108 (patch)
tree9fe490f7b16b33629d85e8c8f5ce5388aea3c1a8
parent09105dcacf525d2029bc9c9267412b78a87567a9 (diff)
downloadxkeyboard-config-34c4cad816342eae566ef70ad9652fe1b4d56108.tar.gz
xkeyboard-config-34c4cad816342eae566ef70ad9652fe1b4d56108.tar.bz2
xkeyboard-config-34c4cad816342eae566ef70ad9652fe1b4d56108.zip
-rw-r--r--cache/cache.c27
1 files changed, 20 insertions, 7 deletions
diff --git a/cache/cache.c b/cache/cache.c
index ac287b3b..85d33d6d 100644
--- a/cache/cache.c
+++ b/cache/cache.c
@@ -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);
+ }
}
}