diff options
author | JengHyun Kang <jhyuni.kang@samsung.com> | 2016-04-25 18:05:46 +0900 |
---|---|---|
committer | JengHyun Kang <jhyuni.kang@samsung.com> | 2016-04-25 18:05:46 +0900 |
commit | 6677ebccaa4887d179f5a8a54a25442112cf5f54 (patch) | |
tree | a659c29e9be9dde0a51d9e3b2628c6527fa44e1b | |
parent | b86c91bed526b8ae52257902b6c06964dd47359c (diff) | |
download | libxkbcommon-6677ebccaa4887d179f5a8a54a25442112cf5f54.tar.gz libxkbcommon-6677ebccaa4887d179f5a8a54a25442112cf5f54.tar.bz2 libxkbcommon-6677ebccaa4887d179f5a8a54a25442112cf5f54.zip |
Add a new API to set key repeatsubmit/tizen/20160425.095238accepted/tizen/wearable/20160425.231923accepted/tizen/tv/20160425.231927accepted/tizen/mobile/20160425.231933accepted/tizen/ivi/20160425.231945accepted/tizen/common/20160426.143143
Change-Id: If1644c4c6575b4eb7cadb8c1e11147651013d8ef
-rw-r--r-- | src/keymap.c | 14 | ||||
-rw-r--r-- | xkbcommon/xkbcommon.h | 4 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/keymap.c b/src/keymap.c index 6ed0408..36f8da4 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -483,3 +483,17 @@ xkb_keymap_key_repeats(struct xkb_keymap *keymap, xkb_keycode_t kc) return key->repeats; } + +XKB_EXPORT int +xkb_keymap_key_set_repeats(struct xkb_keymap *keymap, xkb_keycode_t kc, int enable) +{ + struct xkb_key *key = XkbKey(keymap, kc); + + if (!key) + return 0; + + key->repeats = !!enable; + key->explicit |= EXPLICIT_REPEAT; + + return 1; +} diff --git a/xkbcommon/xkbcommon.h b/xkbcommon/xkbcommon.h index 3f9fb6f..b42aa35 100644 --- a/xkbcommon/xkbcommon.h +++ b/xkbcommon/xkbcommon.h @@ -1120,6 +1120,10 @@ xkb_keymap_led_get_index(struct xkb_keymap *keymap, const char *name); int xkb_keymap_key_repeats(struct xkb_keymap *keymap, xkb_keycode_t key); +int +xkb_keymap_key_set_repeats(struct xkb_keymap *keymap, xkb_keycode_t kc, int enable); + + /** @} */ /** |