keymap: remove XkbKeyGetKeycode
Because we keep the keycode inside the xkb_key now. Signed-off-by: Ran Benita <ran234@gmail.com>master
parent
428c6f313f
commit
be3cbc993e
|
@ -239,7 +239,7 @@ write_keycodes(struct xkb_keymap *keymap, struct buf *buf)
|
|||
continue;
|
||||
|
||||
write_buf(buf, "\t\t%6s = %d;\n",
|
||||
KeyNameText(key->name), XkbKeyGetKeycode(keymap, key));
|
||||
KeyNameText(key->name), key->keycode);
|
||||
}
|
||||
|
||||
for (i = 0; i < XKB_NUM_INDICATORS; i++) {
|
||||
|
|
|
@ -382,13 +382,6 @@ XkbKey(struct xkb_keymap *keymap, xkb_keycode_t kc)
|
|||
return &darray_item(keymap->keys, kc);
|
||||
}
|
||||
|
||||
static inline xkb_keycode_t
|
||||
XkbKeyGetKeycode(struct xkb_keymap *keymap, const struct xkb_key *key)
|
||||
{
|
||||
/* Hack to avoid having to keep the keycode inside the xkb_key. */
|
||||
return (xkb_keycode_t)(key - keymap->keys.item);
|
||||
}
|
||||
|
||||
#define xkb_foreach_key(iter, keymap) \
|
||||
darray_foreach(iter, keymap->keys)
|
||||
|
||||
|
|
Loading…
Reference in New Issue