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 /src | |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/keymap.c | 14 |
1 files changed, 14 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; +} |