summaryrefslogtreecommitdiff
path: root/src/map.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map.c')
-rw-r--r--src/map.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/map.c b/src/map.c
index d4c8f3d..d9afc1a 100644
--- a/src/map.c
+++ b/src/map.c
@@ -351,3 +351,12 @@ err:
*syms_out = NULL;
return 0;
}
+
+/**
+ * Simple boolean specifying whether or not the key should repeat.
+ */
+_X_EXPORT int
+xkb_key_repeats(struct xkb_keymap *keymap, xkb_keycode_t key)
+{
+ return !!(keymap->ctrls->per_key_repeat[key / 8] & (1 << (key % 8)));
+}