diff options
author | JengHyun Kang <jhyuni.kang@samsung.com> | 2016-05-03 17:37:08 +0900 |
---|---|---|
committer | JengHyun Kang <jhyuni.kang@samsung.com> | 2016-05-03 17:37:08 +0900 |
commit | 34c4cad816342eae566ef70ad9652fe1b4d56108 (patch) | |
tree | 9fe490f7b16b33629d85e8c8f5ce5388aea3c1a8 | |
parent | 09105dcacf525d2029bc9c9267412b78a87567a9 (diff) | |
download | xkeyboard-config-34c4cad816342eae566ef70ad9652fe1b4d56108.tar.gz xkeyboard-config-34c4cad816342eae566ef70ad9652fe1b4d56108.tar.bz2 xkeyboard-config-34c4cad816342eae566ef70ad9652fe1b4d56108.zip |
Disable repeat to keyboard keys default if these are handled by keyroutersubmit/tizen/20160503.095918accepted/tizen/wearable/20160504.011900accepted/tizen/tv/20160504.011846accepted/tizen/mobile/20160504.011831accepted/tizen/ivi/20160504.011919accepted/tizen/common/20160504.130113
-rw-r--r-- | cache/cache.c | 27 |
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); + } } } |