For the most part, the documentation aims to be a reference. It is relatively good at that, but relatively weak at answering “how do I” questions (other than the explicit How do I section). In part its weak at this because people use Keyboard Maestro for such a wide variety of tasks that documentation of this sort is pretty much a hopeless task - 90+% of it would be useless to any given reader.
As @philippe says, the best way to amp up your use of Keyboard Maestro is to look through the text tokens and function section to see what is in there, as well as looking through the various lists of example macros:
in the built in Macro Library (menu Window ➤ Macro Library)
OK. GREAT! Thanks for your help, tiffle !
Just some other questions (sorry, absolute beginner here) - is there any simple and compact way of programming one macro for "do x once a key is pressed and holded (maybe a pretty long time, like a modifier key while tab-stepping through applications) and then do y once the key is released" ? Or do I always need to setup two macros separately, one for "key is down" and one for "key is released" ? The problem is, that when I use the "Execute Actions Until Conditions Met" action there's no way of choosing the USB device key (X-Keys USB module) I want to use as condition target - compared to the initial trigger selection menu (FEATURE REQUEST!) ...;-(
I also have the problem that I need to keep KM from interpreting the automatic trigger repeats once a key is down for longer. For example if I want to move the cursor to a certain location as long as a key on a USB controller is pressed down and want to store the initial mouse position in order to get back there after release the auto-repeated key trigger causes the store action to immediately pick up the new location with the first auto-trigger - making this step useless....sure I can find a workaround for this with setting a variable flag definition and a if/then loop definition, but that's really bulky....
And one big issue: I'm using Parallels Desktop and want to use macros there too. I've found though that there seems to be an issue that the keyboard presses don't go through to Windows consistently ! For example I've been setting up a simple macro for quickly jump from one application to the one last used with a key on my USB device and firing off only the simple action "Type the alt-Tab key". This only works about 70% of the time, every 3-5 presses it won't work once, sometimes 2 times in a row....but when I stay in the Mac domain and use cmd-Tab instead it works perfectly fine everytime.....I already tried to limit the macro group to being used with the Parallels app only - without success.....I also observed the macro in Debugging mode - here every action is showing up without interruptions....is this a known issue ? Or even better - is there a way of fixing it ? Like that I can't use KM at all.....
Sorry for getting this long - any help/comments deeply appreciated !
For getting one macro to do two things for press and release: You can set two triggers; one pressed, one released, then have an If/Else using the text condition %Trigger% ends with "pressed" or "released".
You may also find this helpful, specifically the repeat macros:
Thanks for your ideas ! I'll definitely check those suggestions out once I have time to do so...!
But I didn't fully understand your first statement: If I add another Trigger (=2 in total) and use one for let's say "key is down" and one for "key is released"...would %Trigger% always refer to that particular trigger ONLY inside this actual macro ? Or am i supposed to subtitute "Trigger" by lets say "Apple Keyboard Key Pad 5" in case I'm using that numpad key ?
And: I sometimes have the problem of automatic re-triggering once I hold certain keys (and holding for some time always is the case, otherwise my distinction between "action A for initial press(down)" and "action B for release" wouldn't make much sense)....
So once I simply have KM insert two different text phrases for the two cases - I chose to use "BUTTON A (PRESS)" for Trigger pressed and "BUTTON B (RELEASE)" for Trigger released - and I use the Asterisk key on the numpad it keeps
a) writing the "original" key, in this case the printout in MS Word would look like:
BUTTON A (PRESS)***************************[etc. and after releasing] BUTTAN B (RELEASE)
b) repeating the whole phrase like:
BUTTON A (PRESS)BUTTON A (PRESS)BUTTON A (PRESS)BUTTON A (PRESS) [etc] when I use the trigger condition "is down" instead of "is pressed"....
Do you also have a trick for this auto-re-triggering problem ?
Unfortunately/fortunately I'm on holiday and don't have my mac with me so, as much as I'd love to give an example to show what I mean, I can't. I'm back on Monday, so will try to help with examples if someone else hasn't already.
The best I can do right now is point you to this, which demonstrates the use of %Trigger% as mentioned before: