KEY_FIELD_SYMS = (1 << 0),
KEY_FIELD_ACTS = (1 << 1),
KEY_FIELD_REPEAT = (1 << 2),
- KEY_FIELD_BEHAVIOR = (1 << 3),
- KEY_FIELD_TYPE_DFLT = (1 << 4),
- KEY_FIELD_TYPES = (1 << 5),
- KEY_FIELD_GROUPINFO = (1 << 6),
- KEY_FIELD_VMODMAP = (1 << 7),
+ KEY_FIELD_TYPE_DFLT = (1 << 3),
+ KEY_FIELD_TYPES = (1 << 4),
+ KEY_FIELD_GROUPINFO = (1 << 5),
+ KEY_FIELD_VMODMAP = (1 << 6),
};
typedef struct _KeyInfo {
xkb_atom_t types[XkbNumKbdGroups];
enum key_repeat repeat;
- struct xkb_behavior behavior;
unsigned short vmodmap;
xkb_atom_t dfltType;
}
keyi->dfltType = XKB_ATOM_NONE;
- keyi->behavior.type = XkbKB_Default;
- keyi->behavior.data = 0;
keyi->vmodmap = 0;
keyi->repeat = KEY_REPEAT_UNDEFINED;
keyi->out_of_range_group_action = 0;
}
}
- if (UseNewKeyField(KEY_FIELD_BEHAVIOR, into, from, verbosity, &collide)) {
- into->behavior = from->behavior;
- into->defined |= KEY_FIELD_BEHAVIOR;
- }
if (UseNewKeyField(KEY_FIELD_VMODMAP, into, from, verbosity, &collide)) {
into->vmodmap = from->vmodmap;
into->defined |= KEY_FIELD_VMODMAP;
return true;
}
-static const LookupEntry lockingEntries[] = {
- { "true", XkbKB_Lock },
- { "yes", XkbKB_Lock },
- { "on", XkbKB_Lock },
- { "false", XkbKB_Default },
- { "no", XkbKB_Default },
- { "off", XkbKB_Default },
- { "permanent", XkbKB_Lock | XkbKB_Permanent },
- { NULL, 0 }
-};
-
static const LookupEntry repeatEntries[] = {
{ "true", KEY_REPEAT_YES },
{ "yes", KEY_REPEAT_YES },
else if (istreq(field, "locking") ||
istreq(field, "lock") ||
istreq(field, "locks")) {
- unsigned int val;
-
- ok = ExprResolveEnum(ctx, value, &val, lockingEntries);
- if (ok)
- keyi->behavior.type = val;
- keyi->defined |= KEY_FIELD_BEHAVIOR;
+ log_err(info->keymap->ctx,
+ "Key behaviors not supported; "
+ "Ignoring locking specification for key %s\n",
+ LongKeyNameText(keyi->name));
}
else if (istreq(field, "radiogroup") ||
istreq(field, "permanentradiogroup") ||
"Radio groups not supported; "
"Ignoring radio group specification for key %s\n",
LongKeyNameText(keyi->name));
- return false;
}
else if (istreq_prefix("overlay", field) ||
istreq_prefix("permanentoverlay", field)) {
field);
ok = false;
}
+
return ok;
}
}
}
}
- switch (keyi->behavior.type & XkbKB_OpMask) {
- case XkbKB_Default:
- break;
- default:
- key->behavior = keyi->behavior;
- key->explicit |= XkbExplicitBehaviorMask;
- break;
- }
if (keyi->defined & KEY_FIELD_VMODMAP) {
key->vmodmap = keyi->vmodmap;
key->explicit |= XkbExplicitVModMapMask;
}
+
if (keyi->repeat != KEY_REPEAT_UNDEFINED) {
key->repeats = (keyi->repeat == KEY_REPEAT_YES);
key->explicit |= XkbExplicitAutoRepeatMask;