Default action for keys on layer
I know I can do something like the following to apply a modifier to a full layer by default.
[mylayer:M]
But it would be handy to generalise the concept to all actions, so you could define what the default behavior is for a layer. And if a key does not override this, it gets assigned to the default action.
I think it could reduce the amount of lines in the configuration when you want to redeclare all the keys to do the same action. See an example:
[mylayer]
default = layer(otherlayer)
a = b
b = c
And to go even a bit further, a placeholder current could mean the "current key", to allow things like:
[mylayer]
default = timeout(current, 1000, S-current)
a = b
b = c
Here, all keys on mylayer except a and b would be assigned to the timeout operation defined as default.
What do you think?
Cf #651 and in particular https://github.com/rvaiya/keyd/issues/651#issuecomment-1925893039
#681 is also related, and I'd expect that if it makes it in, these two features should be achieved with the same mechanism.
currentcould mean the "current key"
With the current key meaning whatever it is bound to on the layer underneath, I presume.
My usecase is hardly reversable as I would like to apply meta-letter on hold for each key of the keyboard pretty much.
a = timeout(a, 1000, M-a)
...
But thank you for pointing this out.
And yes, I agree, I did not see this issue that you linked but you are right. We are both looking for a way to avoid defining a behavior for "the rest of the keys" on a layer.
To go even a bit further I wanted to even have a way to keep the meta enabled once one of the key has been maintained for 1 second.
So for instance, let's say M-h, M-j, M-k, M-l are used on my desktop environment to focus the windows respectively on the left, down, up or right. If I have the timeout defined for all keys of the keyboard to enable meta, I can do "hold j" to focus window below, and then "hold l" to focus window on the right. But the improvement I had in mind was that this first "hold j" would lock the meta layer, so to then focus the window on the right, I can just hit "l" without holding it.