if (CheckModifierField(keymap, action->type, value, &t1, &t2)) {
act->flags = t1;
act->real_mods = act->mask = (t2 & 0xff);
- act->vmods = (t2 >> 8) & 0xffff;
+ act->vmods = (t2 >> XkbNumModifiers) & 0xffff;
return true;
}
return false;
if (CheckModifierField(keymap, action->type, value, &t1, &t2)) {
act->flags = t1;
act->real_mods = act->mask = (t2 & 0xff);
- act->vmods = (t2 >> 8) & 0xffff;
+ act->vmods = (t2 >> XkbNumModifiers) & 0xffff;
return true;
}
return false;
act->flags = flags & (~XkbSA_ISODfltIsGroup);
act->real_mods = mods & 0xff;
- act->vmods = (mods >> 8) & 0xff;
+ act->vmods = (mods >> XkbNumModifiers) & 0xffff;
return true;
}
else if (field == F_Group) {
else
act->mods &= ~(t2 & 0xff);
- t2 = (t2 >> 8) & 0xffff;
+ t2 = (t2 >> XkbNumModifiers) & 0xffff;
act->vmods_mask |= t2;
if (field == F_Modifiers)
act->vmods |= t2;
return ReportIndicatorBadType(info, led, field, "modifier mask");
led->real_mods = mask & 0xff;
- led->vmods = (mask >> 8) & 0xff;
+ led->vmods = (mask >> XkbNumModifiers) & 0xffff;
led->defined |= LED_FIELD_MODS;
}
else if (istreq(field, "groups")) {
}
tmp.real_mods = mask & 0xff;
- tmp.vmods = (mask >> 8) & 0xffff;
+ tmp.vmods = (mask >> XkbNumModifiers) & 0xffff;
tmp.defined = true;
return AddGroupCompat(info, def->group - 1, &tmp);
}
}
mods = mask & 0xff; /* core mods */
- vmods = (mask >> 8) & 0xffff; /* xkb virtual mods */
+ vmods = (mask >> XkbNumModifiers) & 0xffff; /* xkb virtual mods */
if (type->defined & TYPE_FIELD_MASK) {
log_warn(info->keymap->ctx,
if (!ExprResolveVModMask(info->keymap, arrayNdx, &mask))
return ReportTypeBadType(info, type, "map entry", "modifier mask");
- entry.mods.real_mods = mask & 0xff; /* modifiers < 512 */
- entry.mods.vmods = (mask >> 8) & 0xffff; /* modifiers > 512 */
+ entry.mods.real_mods = mask & 0xff;
+ entry.mods.vmods = (mask >> XkbNumModifiers) & 0xffff;
if ((entry.mods.real_mods & (~type->mask)) ||
(entry.mods.vmods & (~type->vmask))) {
"modifier mask");
new.indexMods = mask & 0xff;
- new.indexVMods = (mask >> 8) & 0xffff;
+ new.indexVMods = (mask >> XkbNumModifiers) & 0xffff;
if ((new.indexMods & (~type->mask)) ||
(new.indexVMods & (~type->vmask))) {
}
new.preMods = mask & 0xff;
- new.preVMods = (mask >> 16) & 0xffff;
+ new.preVMods = (mask >> XkbNumModifiers) & 0xffff;
if ((new.preMods & (~new.indexMods)) ||
(new.preVMods & (~new.indexVMods))) {
xkb_atom_t types[XkbNumKbdGroups];
enum key_repeat repeat;
- unsigned short vmodmap;
+ xkb_mod_mask_t vmodmap;
xkb_atom_t dfltType;
uint8_t out_of_range_group_action;
ok = ExprResolveVModMask(info->keymap, value, &mask);
if (ok) {
- keyi->vmodmap = (mask >> 8);
+ keyi->vmodmap = (mask >> XkbNumModifiers) & 0xffff;
keyi->defined |= KEY_FIELD_VMODMAP;
}
else {