To make it easier to see where it's used. The name is just to match
MOD_REAL.
Signed-off-by: Ran Benita <ran234@gmail.com>
MOD_BOTH = (MOD_REAL | MOD_VIRT),
};
+#define MOD_REAL_MASK_ALL ((xkb_mod_mask_t) 0x000000ff)
+
enum xkb_action_type {
ACTION_TYPE_NONE = 0,
ACTION_TYPE_MOD_SET,
if (mask == 0)
return "none";
- if (mask == 0xff)
+ if (mask == MOD_REAL_MASK_ALL)
return "all";
str = buf;
expr->value.str);
if (pred_txt && istreq(pred_txt, "any")) {
*pred_rtrn = MATCH_ANY;
- *mods_rtrn = 0xff;
+ *mods_rtrn = MOD_REAL_MASK_ALL;
return true;
}
}
str = xkb_atom_text(ctx, field);
if (istreq(str, "all")) {
- *val_rtrn = 0xff;
+ *val_rtrn = MOD_REAL_MASK_ALL;
return true;
}
xkb_mod_index_t i;
/* The effective mask is only real mods for now. */
- mods->mask = mods->mods & 0xff;
+ mods->mask = mods->mods & MOD_REAL_MASK_ALL;
darray_enumerate(i, mod, keymap->mods)
if (mods->mods & (1 << i))