Fundamental_Concepts
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| Fundamental_Concepts [2025/02/04 03:17] – peternlewis | Fundamental_Concepts [2025/07/25 08:06] (current) – peternlewis | ||
|---|---|---|---|
| Line 6: | Line 6: | ||
| If you are new to Keyboard Maestro, this may not be the place to start - this is describing things that while fundamental, | If you are new to Keyboard Maestro, this may not be the place to start - this is describing things that while fundamental, | ||
| + | |||
| + | ==== Getting Help ==== | ||
| + | |||
| + | All through Keyboard Maestro you can use the Option key to get direct links to the wiki reference. | ||
| + | |||
| + | * Hold the Option key while selecting from the New Trigger menu to get help on the various triggers. | ||
| + | * Hold the Option key while selecting a new Action to get help on the specific actions. | ||
| + | * Hold the Option key when selecting from the Edit Insert menus to get help on Actions, Functions, or Tokens. | ||
| + | |||
| + | You can also use the search in the Help menu to search the wiki for topics, as well as getting Help on Regular Expressions and ICU Date Formats. | ||
| + | |||
| + | If a macro ever “does nothing”, the Interactive Help can explain why the macro is not triggering, or ensure that it is triggering so you know to look at the actions instead. | ||
| + | |||
| + | And of course you can [[https:// | ||
| ==== Where Are Macros Stored? ==== | ==== Where Are Macros Stored? ==== | ||
| Line 26: | Line 40: | ||
| There is no way to know how fast the two macros will execute, or if they both are triggered by the same event, action will start first. Even if Macro A started first, the first action of Macro B might be the next action to start, and while it was executing the first and second action of Macro A might execute. | There is no way to know how fast the two macros will execute, or if they both are triggered by the same event, action will start first. Even if Macro A started first, the first action of Macro B might be the next action to start, and while it was executing the first and second action of Macro A might execute. | ||
| - | Each macro runs independently, | + | Each macro runs independently, |
| Within an executing macro instance, the actions execute in sequential order. | Within an executing macro instance, the actions execute in sequential order. | ||
| Line 33: | Line 47: | ||
| You can use the [[action: | You can use the [[action: | ||
| + | |||
| + | ==== The System Event Queue ==== | ||
| + | |||
| + | When UI events happen (press key, move or click mouse, etc), including when Keyboard Maestro simulates them, they are placed in the event queue which is a system wide queue. A big part of what an application does is run a loop that extracts the next event from that queue and handles it. | ||
| + | |||
| + | So the application asks the system for the next event, and the system looks at the event and decides what to do - maybe the event is a keystrokes and so the system checks if it is a registered hot key, and if so that is handled in one way, or it is a key press so the system goes through a complicated process checking whether the key is a menu shortcut matching an enabled menu, or something that the window can handle, which in turn looks at something the focused item or its parents can handle. | ||
| + | |||
| + | If nothing can be found to handle the key, then the system might decide to make a beep alert noise and drop the event. | ||
| + | |||
| + | This is also why it's impossible to safely do things like capture a key and then decide to allow it to be handled as a normal key, because the only way to do that would be to put it in the event back in the queue. Since you can only add events to the end of the queue and read events from the start of the queue, taking an event out, looking at it and putting it back means it is placed out of order. You cannot shove the event back in at the start of the queue, only add it to the end. | ||
| + | |||
| + | It's also a typical source of issues needing a Pause because the event queue means that events that are simulated will be handled when the application is ready to handle them, but if you change the focus (activate an application, | ||
| + | |||
| + | |||
Fundamental_Concepts.1738639062.txt.gz · Last modified: by peternlewis
