> For the complete documentation index, see [llms.txt](https://jonny-wamsley.gitbook.io/the-ultimate-guide-to-keyboard-layers/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jonny-wamsley.gitbook.io/the-ultimate-guide-to-keyboard-layers/ch-6-layer-examples/layers/context-control-macro-layer.md).

# Context Control / Macro Layer

For context control, there are 2 main shortcuts. Switching between different applications which can be done natively on mac with `cmd+tab` and switching between multiple instances of an application with `cmd+tilda`.

I use [Keyboard Maestro](https://www.keyboardmaestro.com/main/) and have a modifier layer(meh) set to the caps lock key to trigger commands. Within keyboard maestro, it has its own application switch that I find more visually pleasing. I activate switching applications with caps+d and between the same applications with caps+f.

### Application switcher

![](https://3776368646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKoZa1xwxAlOy01IlxMgW%2Fuploads%2FCd1s7LBLy8KL2YKShqhp%2FScreen%20Shot%202022-06-12%20at%205.11.49%20PM.png?alt=media\&token=58c90cfc-918d-4e9d-99da-cd60fb50855e)

### Multiple instances application switcher

![](https://3776368646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKoZa1xwxAlOy01IlxMgW%2Fuploads%2FFDKCme1Z4Dru3hSQOZ4W%2FScreen%20Shot%202022-06-12%20at%205.12.49%20PM.png?alt=media\&token=9fc2d8ec-9bd5-45c5-8508-494c61dd6d2b)

### Paste Previous Clipboard Macro

This has saved me many times and allows me to more easily switch content in two different locations. I added this macro to the [editing/navigation layer](/the-ultimate-guide-to-keyboard-layers/ch-6-layer-examples/layers/editing-and-navigating-layer.md) on the "b" key near the paste.&#x20;

![](https://3776368646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKoZa1xwxAlOy01IlxMgW%2Fuploads%2F1pN4U1kGmMUFUtN6rH8A%2FScreen%20Shot%202022-06-12%20at%205.19.17%20PM.png?alt=media\&token=8886e8a2-ea7d-4934-9685-a4da017fa2bb)

### Pomodoro Timer

I use this all the time. I have a pomo timer that allows you to specify a time, then and optional parameters. Then after the timer ends, a prompt will appear. At a later date, I'll share the full application that sends user data to a log file. I would like to have some nice visuals using this data, but have not had the motivation / time to implement that functionality yet.

![](https://3776368646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKoZa1xwxAlOy01IlxMgW%2Fuploads%2F6kF96EmfwsRXvyNjqtnf%2FScreen%20Shot%202022-06-12%20at%205.21.57%20PM.png?alt=media\&token=2b1141a3-d9f0-4872-abbd-e62627d900d2)

### Hot strings

Hot strings are just a series of characters typed. I have a couple of them that are custom to individuals like emails or work related strings. An example of a common string I use is `http://localhost:` that can be done with the code below.

![](https://3776368646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKoZa1xwxAlOy01IlxMgW%2Fuploads%2Fes8cIkaJnbLFvSapKxK5%2FScreen%20Shot%202022-06-12%20at%205.27.04%20PM.png?alt=media\&token=afd8b350-719e-423b-b6ba-3a1527aa9b9c)

### Automatically trigger applications, macros or scripts

If you want to trigger applications, macros, or scripts at a certain time or on start, then the code block below can be useful.

![](https://3776368646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKoZa1xwxAlOy01IlxMgW%2Fuploads%2FUBFje8NzSbrd9jMGTxPg%2FScreen%20Shot%202022-06-12%20at%205.33.01%20PM.png?alt=media\&token=21853217-1a9d-4ce7-8605-a76ebe8ce9ff)
