Branch
Hash :
636b8b97
Author :
Date :
2025-03-19T14:11:52
test: Add merge mode tests for all the sections The merge modes tests C file is now only generated locally, because it is too large. The generator Python script requires Jinja2, so the test is optional and depends on Jinja22 availability. The test aim to be exhaustive with various combinations of a base and an update: - plain base + plain update, for every mode - plain base + include (for every mode) update (every mode) - single include (base +| update)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
xkb_compat {
virtual_modifiers M1=0x1000, M2=0x2000, M3=0x4000, M4=0x8000;
interpret.repeat= False;
// Effective: override
interpret.repeat= True;
interpret.virtualmod = M1;
// Effective: override
interpret.virtualmod = M2;
// Ineffective: cannot augment previous value
augment interpret.virtualmod = M3;
SetGroup.group = 1;
// Effective: override
SetGroup.group = 2;
// Ineffective: cannot augment previous value
augment SetGroup.group = 3;
// Effective: *override* every explicit field
interpret a {
virtualmod = M4;
action=SetGroup(group=1);
};
interpret A {
repeat = False;
virtualmod = M1;
action=SetMods(mods=M1);
};
// Effective: no previous interpret entry,
// so *override* every explicit field
augment interpret s {
repeat = False;
action=SetGroup();
};
// Only augment fields not set previously (explicit or implicit)
augment interpret s {
// Ineffective: cannot augment previous implicit value
virtualmod = M4;
// Ineffective: cannot augment previous explicit value
action=SetGroup(group=4);
// Effective: no previous value
useModMapMods=level1;
};
augment interpret S {
action=SetGroup(group=4);
};
indicator.modifiers = M1;
indicator.modifiers = M2;
augment indicator.modifiers = M3;
indicator.groups = All - 1;
indicator.controls = AudibleBell;
indicator "A" {
modifiers = M4;
whichmodstate = base;
};
indicator "A" {
whichmodstate = locked;
whichgroupstate = locked;
controls = SlowKeys;
};
augment indicator "B" {
modifiers = M4;
whichmodstate = base;
};
augment indicator "B" {
groups = 4;
whichmodstate = locked;
whichgroupstate = locked;
};
};