keymap-dump: follow xkbcomp in printing affect=both in pointer actions
It is equivalent to nothing but good to match up. Signed-off-by: Ran Benita <ran@unusedvar.com>master
parent
ac6cd20c55
commit
fbf087ea94
|
@ -277,9 +277,11 @@ write_led_map(struct xkb_keymap *keymap, struct buf *buf,
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
affect_lock_text(enum xkb_action_flags flags)
|
affect_lock_text(enum xkb_action_flags flags, bool show_both)
|
||||||
{
|
{
|
||||||
switch (flags & (ACTION_LOCK_NO_LOCK | ACTION_LOCK_NO_UNLOCK)) {
|
switch (flags & (ACTION_LOCK_NO_LOCK | ACTION_LOCK_NO_UNLOCK)) {
|
||||||
|
case 0:
|
||||||
|
return show_both ? ",affect=both" : "";
|
||||||
case ACTION_LOCK_NO_UNLOCK:
|
case ACTION_LOCK_NO_UNLOCK:
|
||||||
return ",affect=lock";
|
return ",affect=lock";
|
||||||
case ACTION_LOCK_NO_LOCK:
|
case ACTION_LOCK_NO_LOCK:
|
||||||
|
@ -317,7 +319,7 @@ write_action(struct xkb_keymap *keymap, struct buf *buf,
|
||||||
write_buf(buf, "%s%s(modifiers=%s%s%s%s)%s", prefix, type, args,
|
write_buf(buf, "%s%s(modifiers=%s%s%s%s)%s", prefix, type, args,
|
||||||
(action->type != ACTION_TYPE_MOD_LOCK && (action->mods.flags & ACTION_LOCK_CLEAR)) ? ",clearLocks" : "",
|
(action->type != ACTION_TYPE_MOD_LOCK && (action->mods.flags & ACTION_LOCK_CLEAR)) ? ",clearLocks" : "",
|
||||||
(action->type != ACTION_TYPE_MOD_LOCK && (action->mods.flags & ACTION_LATCH_TO_LOCK)) ? ",latchToLock" : "",
|
(action->type != ACTION_TYPE_MOD_LOCK && (action->mods.flags & ACTION_LATCH_TO_LOCK)) ? ",latchToLock" : "",
|
||||||
(action->type == ACTION_TYPE_MOD_LOCK) ? affect_lock_text(action->mods.flags) : "",
|
(action->type == ACTION_TYPE_MOD_LOCK) ? affect_lock_text(action->mods.flags, false) : "",
|
||||||
suffix);
|
suffix);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -347,7 +349,7 @@ write_action(struct xkb_keymap *keymap, struct buf *buf,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACTION_TYPE_PTR_LOCK:
|
case ACTION_TYPE_PTR_LOCK:
|
||||||
args = affect_lock_text(action->btn.flags);
|
args = affect_lock_text(action->btn.flags, true);
|
||||||
/* fallthrough */
|
/* fallthrough */
|
||||||
case ACTION_TYPE_PTR_BUTTON:
|
case ACTION_TYPE_PTR_BUTTON:
|
||||||
write_buf(buf, "%s%s(button=", prefix, type);
|
write_buf(buf, "%s%s(button=", prefix, type);
|
||||||
|
@ -382,7 +384,7 @@ write_action(struct xkb_keymap *keymap, struct buf *buf,
|
||||||
case ACTION_TYPE_CTRL_LOCK:
|
case ACTION_TYPE_CTRL_LOCK:
|
||||||
write_buf(buf, "%s%s(controls=%s%s)%s", prefix, type,
|
write_buf(buf, "%s%s(controls=%s%s)%s", prefix, type,
|
||||||
ControlMaskText(keymap->ctx, action->ctrls.ctrls),
|
ControlMaskText(keymap->ctx, action->ctrls.ctrls),
|
||||||
(action->type == ACTION_TYPE_CTRL_LOCK) ? affect_lock_text(action->ctrls.flags) : "",
|
(action->type == ACTION_TYPE_CTRL_LOCK) ? affect_lock_text(action->ctrls.flags, false) : "",
|
||||||
suffix);
|
suffix);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -887,16 +887,16 @@ xkb_compatibility "complete" {
|
||||||
action= PtrBtn(button=3,count=2);
|
action= PtrBtn(button=3,count=2);
|
||||||
};
|
};
|
||||||
interpret Pointer_Drag_Dflt+AnyOfOrNone(all) {
|
interpret Pointer_Drag_Dflt+AnyOfOrNone(all) {
|
||||||
action= LockPtrBtn(button=default);
|
action= LockPtrBtn(button=default,affect=both);
|
||||||
};
|
};
|
||||||
interpret Pointer_Drag1+AnyOfOrNone(all) {
|
interpret Pointer_Drag1+AnyOfOrNone(all) {
|
||||||
action= LockPtrBtn(button=1);
|
action= LockPtrBtn(button=1,affect=both);
|
||||||
};
|
};
|
||||||
interpret Pointer_Drag2+AnyOfOrNone(all) {
|
interpret Pointer_Drag2+AnyOfOrNone(all) {
|
||||||
action= LockPtrBtn(button=2);
|
action= LockPtrBtn(button=2,affect=both);
|
||||||
};
|
};
|
||||||
interpret Pointer_Drag3+AnyOfOrNone(all) {
|
interpret Pointer_Drag3+AnyOfOrNone(all) {
|
||||||
action= LockPtrBtn(button=3);
|
action= LockPtrBtn(button=3,affect=both);
|
||||||
};
|
};
|
||||||
interpret Pointer_EnableKeys+AnyOfOrNone(all) {
|
interpret Pointer_EnableKeys+AnyOfOrNone(all) {
|
||||||
action= LockControls(controls=MouseKeys);
|
action= LockControls(controls=MouseKeys);
|
||||||
|
|
|
@ -880,16 +880,16 @@ xkb_compatibility "complete_caps(caps_lock)_4_misc(assign_shift_left_action)_4_l
|
||||||
action= PtrBtn(button=3,count=2);
|
action= PtrBtn(button=3,count=2);
|
||||||
};
|
};
|
||||||
interpret Pointer_Drag_Dflt+AnyOfOrNone(all) {
|
interpret Pointer_Drag_Dflt+AnyOfOrNone(all) {
|
||||||
action= LockPtrBtn(button=default);
|
action= LockPtrBtn(button=default,affect=both);
|
||||||
};
|
};
|
||||||
interpret Pointer_Drag1+AnyOfOrNone(all) {
|
interpret Pointer_Drag1+AnyOfOrNone(all) {
|
||||||
action= LockPtrBtn(button=1);
|
action= LockPtrBtn(button=1,affect=both);
|
||||||
};
|
};
|
||||||
interpret Pointer_Drag2+AnyOfOrNone(all) {
|
interpret Pointer_Drag2+AnyOfOrNone(all) {
|
||||||
action= LockPtrBtn(button=2);
|
action= LockPtrBtn(button=2,affect=both);
|
||||||
};
|
};
|
||||||
interpret Pointer_Drag3+AnyOfOrNone(all) {
|
interpret Pointer_Drag3+AnyOfOrNone(all) {
|
||||||
action= LockPtrBtn(button=3);
|
action= LockPtrBtn(button=3,affect=both);
|
||||||
};
|
};
|
||||||
interpret Pointer_EnableKeys+AnyOfOrNone(all) {
|
interpret Pointer_EnableKeys+AnyOfOrNone(all) {
|
||||||
action= LockControls(controls=MouseKeys);
|
action= LockControls(controls=MouseKeys);
|
||||||
|
|
Loading…
Reference in New Issue