X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fkeymap.h;h=f7ea5bdf1f6b28014293dd23e6f7766e659b5a46;hb=1608c9d4a753e66c7e46dc2a5be69079470ec75b;hp=c15052bc7f0811b401d556fb6a972516b9335aa1;hpb=26453b84732da870f5695ee347970b337cfea9c1;p=platform%2Fupstream%2Flibxkbcommon.git diff --git a/src/keymap.h b/src/keymap.h index c15052b..f7ea5bd 100644 --- a/src/keymap.h +++ b/src/keymap.h @@ -109,6 +109,9 @@ /* Don't allow more leds than we can hold in xkb_led_mask_t. */ #define XKB_MAX_LEDS ((xkb_led_index_t) (sizeof(xkb_led_mask_t) * 8)) +/* Special value to handle modMap None {…} */ +#define XKB_MOD_NONE 0xffffffffU + /* These should all go away. */ enum mod_type { MOD_REAL = (1 << 0), @@ -438,6 +441,17 @@ XkbKeyNumLevels(const struct xkb_key *key, xkb_layout_index_t layout) return key->groups[layout].type->num_levels; } +/* + * If the virtual modifiers are not bound to anything, the entry + * is not active and should be skipped. xserver does this with + * cached entry->active field. + */ +static inline bool +entry_is_active(const struct xkb_key_type_entry *entry) +{ + return entry->mods.mods == 0 || entry->mods.mask != 0; +} + struct xkb_keymap * xkb_keymap_new(struct xkb_context *ctx, enum xkb_keymap_format format,