summaryrefslogtreecommitdiff
path: root/keysyms/xcb_keysyms.h
diff options
context:
space:
mode:
Diffstat (limited to 'keysyms/xcb_keysyms.h')
-rw-r--r--keysyms/xcb_keysyms.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/keysyms/xcb_keysyms.h b/keysyms/xcb_keysyms.h
index 1202982..9d34a50 100644
--- a/keysyms/xcb_keysyms.h
+++ b/keysyms/xcb_keysyms.h
@@ -19,8 +19,19 @@ xcb_keysym_t xcb_key_symbols_get_keysym (xcb_key_symbols_t *syms
xcb_keycode_t keycode,
int col);
-xcb_keycode_t xcb_key_symbols_get_keycode (xcb_key_symbols_t *syms,
- xcb_keysym_t keysym);
+/**
+ * @brief Get the keycodes attached to a keysyms.
+ * There can be several value, so what is returned is an array of keycode
+ * terminated by XCB_NO_SYMBOL. You are responsible to free it.
+ * Be aware that this function can be slow. It will convert all
+ * combinations of all available keycodes to keysyms to find the ones that
+ * match.
+ * @param syms Key symbols.
+ * @param keysym The keysym to look for.
+ * @return A XCB_NO_SYMBOL terminated array of keycode, or NULL if nothing is found.
+ */
+xcb_keycode_t * xcb_key_symbols_get_keycode(xcb_key_symbols_t *syms,
+ xcb_keysym_t keysym);
xcb_keysym_t xcb_key_press_lookup_keysym (xcb_key_symbols_t *syms,
xcb_key_press_event_t *event,