summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJengHyun Kang <jhyuni.kang@samsung.com>2016-04-25 18:05:46 +0900
committerJengHyun Kang <jhyuni.kang@samsung.com>2016-04-25 18:05:46 +0900
commit6677ebccaa4887d179f5a8a54a25442112cf5f54 (patch)
treea659c29e9be9dde0a51d9e3b2628c6527fa44e1b /src
parentb86c91bed526b8ae52257902b6c06964dd47359c (diff)
downloadlibxkbcommon-6677ebccaa4887d179f5a8a54a25442112cf5f54.tar.gz
libxkbcommon-6677ebccaa4887d179f5a8a54a25442112cf5f54.tar.bz2
libxkbcommon-6677ebccaa4887d179f5a8a54a25442112cf5f54.zip
Change-Id: If1644c4c6575b4eb7cadb8c1e11147651013d8ef
Diffstat (limited to 'src')
-rw-r--r--src/keymap.c14
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;
+}