There is a kind of usecases that have been popping up again and again, that could be (at least partially) solved by assigning the same macro to the entire base layer. The trouble is that all these keys/macros, despite doing basically the same thing, have some default action (usually a scancode tap/hold) that needs to be customized for each key. This makes the use of macro engine very clumsy for these usecases.
One of these usecases is Autoshift. Another is having multiple macro runtime slots (that one can be solved using $thisKeyId
).
There is the activateKeyPostponed
, which allows queuing a key action from another layer for execution, but in practice, this is very clumsy, so this is a call for a general brainstorm for a simple-to-implement-yet-powerful-in-practice solution.
My takes:
-
Make runtime variables accept scancode abbreviation via (e.g.)
$scancode.a
. MaketapKey/holdKey/...
accept generic integer as a scancode (this conflicts with numbers as key parameters). Furthermore, introduce a new generic variable, e.g.,
$keyScancode.LAYER.KEYID
.- pros: allows arithmetics over scancodes, is simple to implement as this would internally use the already present integer variable type
- cons: doesn’t support modifiers
-
The same, but with full shortcuts (i.e., scancode plus modifier mask).
- pros: more powerful
- cons: A trouble is that current full shortcut specification allows specifying full set of input/output/sticky modifiers, as well as action type (tap/hold/press/release), which means that this doesn’t fit the 4 bytes that are dedicated to variables.
-
Add a general way to parametrize key actions with generic arguments. (How exactly?
- yet more general than the above, allowing e.g., using one macro to set multiple sets of parameters: e.g., binding the same macro to 6 different keys to set led brightness to 0%, 20%, 40%, 60%, 80%, 100%
- cons: (a huge cons) this is complicated, requiring Agent support and serialization support.
So far I am inclined to the first one, as it is basically a simple, yet sufficient, subset of the second one, and I can make it reality without requiring huge efforts from Laszlo and Eric.
Please, lets confine ourselves to the boundaries of practicable and user-friendly things (@maexx), since if this blows up into a pile of overly-complex ideas that no-one except for its creators is going to understand, then this will probably not get implemented at all.
@mlac, please step in whenever you like to set boundaries of what you consider reasonable.
(Note: this would normally be a github ticket, but I hope that forum thread will get more attention.)