This is some digging into where we can go beyond EventHandle-DefaultMapping.
From button mapping to events handing, TARGET gives many possibilities for advanced configuration.
Going along the way from reading about those lightly(!) documented features to coding something useful, I had some results I can share here as they become somewhat readable ;o)
I like it but help would be great too !
int EventHandle(int type, alias o, int x) // {{{
{
if((x < IN_POSITION_AXES) & o[x])
logKeyEvent(&o, x);
DefaultMapping(&o, x);
}
.. ./...
int getEventLayer(alias o, int x) // {{{
{
int i, k;
while(i < 9)
if(&&o[x] == layer_sw[i]) {
layer_sw[i+2] = layer_sw[i+2] & layer_sw[i+1] ^ o[x];
if(i>0 & layer_sw[i+2]) layer_sw[11-i] = 0;
break;
}
else i = i+3;
k = k + layer_sw[2] + ((layer_sw[8] + !layer_sw[5]) << 1);
return k;
}