diff --git a/MACRO_DOCS.md b/MACRO_DOCS.md index d20ddc350..1954a2228 100644 --- a/MACRO_DOCS.md +++ b/MACRO_DOCS.md @@ -162,6 +162,11 @@ Similar command can be used to implement "loose gestures" - i.e., shortcuts wher In the above examples, `tapKey` can be (and probably should be) replaced by `holdKey`. "Hold" activates the scancode for as long as the key is pressed while "tap" activates it just for a fraction of a second. This distinction may seem unimportant, but just as long as you don't try to play some games with it. +Complex key sequences can be achieved using `tapKeySeq`. For instance, following emoji macro (uses linux Ctrl+U notation) - tap `thisMacro + s + h` (as shrug) to get shrugging person, or `thisMacro + s + w` to get sweaty smile. + + $ifGesture 80 73 final tapKeySeq CS-u 1 f 6 0 5 space + $ifGesture 80 21 final tapKeySeq CS-u 1 f 9 3 7 space + You can simplify writing macros by using `#` and `@` characters. The first resolves a number as an index of a register. The second interprets the number as a relative action index. For instance the following macro will write out five "a"s with 50 ms delays //you can comment your code via two slashes. @@ -251,7 +256,8 @@ The following grammar is supported: COMMAND = playMacro [] COMMAND = {startMouse|stopMouse} {move DIRECTION|scroll DIRECTION|accelerate|decelerate} COMMAND = {setReg|addReg|subReg|mulReg} - COMMAND = {pressKey|holdKey|tapKey|releaseKey} [sticky] SHORTCUT + COMMAND = {pressKey|holdKey|tapKey|releaseKey} SHORTCUT + COMMAND = tapKeySeq [SHORTCUT]+ COMMAND = set module.MODULEID.navigationMode.LAYERID NAVIGATIONMODE COMMAND = set module.MODULEID.baseSpeed COMMAND = set module.MODULEID.speed @@ -270,8 +276,8 @@ The following grammar is supported: COMMAND = set debounceDelay