top of page
Search

Increase productivity by working in context

I’m a big fan of Mac Power Users, a podcast all about getting the most out of your Apple tech and my favourite aspect, getting your Apple tech to do your work for you. David Sparks hosts the show along with Stephen Hackett but it is David who has come up with this concept of contextual computing, a concept which really resonates with me and I wanted to share it with you all



What is contextual Computing?

Contextual computing is a method of working which helps keep you focused on the current task at hand. It does this by automating the parts of your workflow which can divert you away from the job you should be doing. The concept is very simple and involves creating easily accessible shortcuts that perform specific operations within the context of the work you are carrying out. This could be an operation such as taking you to a particular folder in the file system, opening up a specific webpage, opening a specific inbox in your email client or arranging the windows on your desktop.


Below is a quick example of me using Contextual Computing to Navigate straight to a folder in my file system, and then navigating straight to the Fourth Wall website without having to interact with the file system or browser.


What are contexts?

Contexts are the virtual boundaries that separate the different types of work that we carry out on our computers. These contexts also define how we group our shortcuts. So rather than having our shortcuts grouped by application (Notion, Word, Photoshop etc.) or category (Productivity etc.), we instead group them by the context of work we are carrying out (Working on your blog, your day job, Personal use etc.).


Jumping ahead slightly, below you can see my context for when I am working on my blog. It is a curated list of shortcuts that help me get my blogging done. There are shortcuts to launch apps, links to folders and my email.


The idea is that once you choose a context to work in, you keep yourself there for as long as you can and avoid getting distracted by other things.


Working without Contextual Computing

I wanted to highlight the workflow that the majority follow when having not implemented contextual computing. It usually goes something like this:


  • You first start with an idea of something you would like to do, this could be sending an email to a friend, navigating to a website or, it could be, that you want to open a couple of applications and set their positions on your desktop.


  • Next, you have to act on that thought and more often than not this will involve opening an application - To get to a website we need to open a browser, to get to our inbox we need to open our mail client and to arrange our applications we need to open some applications.

  • The final step is then to perform the action we wanted in the first place. This will be writing and sending the email, consuming the content from the web page or getting on with work once you have arranged the windows on your screen.


This is a perfectly legitimate workflow but the issue here is with Step 2. It is the opening of the application that leaves us vulnerable to distractions, diversions and delays.


The 3 D’s

At the core of David’s Contextual Computing process is the concept of eliminating the 3 D’s: Distractions, Diversions and Delays. Programs and applications on our computers often open us up to these three things and prevent us from getting on with the work we should be doing.


Here is an example - You’re working on your PC when you need to send an email. You open up your email client and something catches your eye, a new email from a friend is sitting in your inbox, it immediately takes your attention away from what you should be doing and that’s it, you’ve been distracted and you’ve lost 10 minutes of work. Another situation could be that you need to pull up a Google Doc but rather than opening your browser and heading straight there, you’ve left a tab open, it was YouTube, and now you’ve watched 2 or 3 videos of cats and 5 minutes have gone by.


So the idea with contextual computing is to take the application out of the equation by automating that part of the process and taking you directly to where you need to be.


Contextual Computing on Mac

Contextual Computing on Mac is a simple solution as David has already gone ahead and figured this one out for us. The secret is with an application that both myself and David are enthusiastic users of and that is, Keyboard Maestro. I am not going to go into great depth about Keyboard Maestro as it is a topic that requires its own post in the future, I will, however, tell you why we use it and how we can build out our Contextual Computing solution.


FYI - Keyboard Maestro is a paid-for application (not a subcription) but does have a free trial

Contextual Computing requires a combination of keyboard shortcuts and automation to complete our tasks, both of which Keyboard Maestro is fantastic at. One of the main problems with Keyboard Shortcuts though is that they are often hard to remember, especially when you don’t use them that often. I also find that I run out of keys to use…


Conflict Palettes are the Solution

The conflict palette solves our issue of trying to remember multiple different shortcuts and running out of keys to use. When using Keyboard Maestro, we create automations that run based on a set trigger. This trigger can be an array of different things but the most common is a keyboard shortcut. You press the shortcut and the corresponding automation runs. A conflict palette is a feature to help users when they have mistakenly used the same keyboard shortcut for multiple automations. Let’s say you press “⇧ + ⌘ + B” to launch an automation but you have multiple automations assigned to that trigger. What you get is the conflict palette below.

This palette not only visualises the conflict but also allows you to run either of the automations directly from the window. This can be done by selecting them with the cursor or using the keyboard.


If we take the list above we can choose a shortcut either with our cursor or we can use the keyboard to filter the list down to a final selection. As you can see the first letter of each row in the list is highlighted (grey) and we can type the corresponding letter to filter the list down to just those items. In this example, I can press the “f” key to filter the list down to everything beginning with “f”.


From here we can then type the next highlighted letter, in this case, I will type the letter “p” to access my “Posts” folder.

Note: Keyboard Maestro will automatically skip over letters which are the same.


This is an extremely fast way of launching automations without the risk of forgetting your keyboard shortcuts. You can review the Gif at the start of this post to see it in action and at full speed.


Creating our Keyboard Maestro shortcuts

Now you can see how this all works, let’s take a look at how we create these conflict pallets in Keyboard Maestro.


Below you can see my Fourth Wall Context in Keyboard Maestro, in which, you will find all of my shortcuts and automations. You can see here that they are all triggered by the same keystroke “⇧ + CTRL + ⌥ + ⌘ + W” (I have my Caps Lock key mapped to simulate me pressing “⇧ CTRL ⌘”) and as we now know this is going to create a conflict palette.

I am not going to go into how to create the automations in Keyboard Maestro as this post is already quite long and I think Keyboard Maestro deserves a separate post in the future. What I have done though, is attach some example Keyboard Maestro shortcuts which you can download below and have a play with.



Contextual Computing on Windows


Now David Sparks is an Apple guy through and through, whereas I sit a little bit more on the fence and also use Windows. I wanted to bring this concept of Contextual computing over to my PC but unfortunately and much to my dismay, we do not have access to Keyboard Maestro 😞. So we have to use another application.


I have long been a user of AutoHotkey, and although I wouldn’t call myself an expert in the program, I was pretty certain I could implement something similar. It is by no means perfect in its current state but I have been using it for a little while and it has become a useful tool in my PC workflow. Unfortunately, AutoHotkey isn’t as user-friendly as Keyboard Maestro and requires us to build scripts in order to carry out our automations. I have tried my best to break it all down but some knowledge of scripting may be required.


Conflict Palettes

I really liked the concept of the conflict palette and wanted to implement something similar on Windows using AutoHotkey. Now, although AutoHotkey doesn’t throw up a dialogue box when you use the same trigger for many different shortcuts it does let you build simple UI’s and GUI interfaces. One of the UI elements we can create is a Menu. This menu will pop up next to your cursor (or in a defined location if you wish) when you press your keyboard shortcut and each menu item can have its own automation attached to it.


Below is a screenshot of the context I use when blogging.


Note: We are unable to filter the list like you can with Keyboard Maestro but you can use the keyboard letters and arrow keys to navigate the list. (I think you could filter the list if you knew how to code better than myself… If you can code better than me can you have a go and send me the results? 😁)


As with Keyboard Maestro, I am not going to go into the detail of how to set up and run AutoHotkey but I will break down the script I have used to create mine/David’s Contextual Computing system. I have also attached the script I use so that you can take it and modify it to your requirements.



Let’s now break down the code so that so you can understand how to modify it if you don’t already use AutoHotkey.


Create Menu Items

The first part of the code defines our menu and what options should be presented to the user. You can simply modify the “Menu Item Name” and the “Action to Call” variables to create your own Menu items.


Commas separate the code (,) but to help illustrate things a little clearer I have populated some of the code into a table below. Hopefully, this makes things a little easier to see what each “column” is defining

Type

Menu Name

New Menu Item

Menu Item Name

Action to call

Menu

MyMenu

Add

Folder - Blog

BlogHandler

Menu

MyMenu

Add

Folder - Posts


FYI - Anything with a semicolon “;” before it is a comment and ignored by AutoHotkey

; Folder Menu Items
Menu, MyMenu, Add, Folder - Blog, BlogHandler
Menu, MyMenu, Add, Folder - Posts, PostsHandler
Menu, MyMenu, Add, Folder - Start, StartHandler
Menu, MyMenu, Color, f0eff4

Menu, MyMenu, Add ; Add a separator line.

; URL Menu Items
Menu, MyMenu, Add, URL - Wix, WixHandler
Menu, MyMenu, Add, URL - Fourth-Wall, FWHandler

Menu, MyMenu, Add ; Add a separator line.

;Programs Menu Items
Menu, MyMenu, Add, App - Spotify, SpotHandler
Menu, MyMenu, Add, App- Notion, NotionHandler

Menu, MyMenu, Add ; Add a separator line.

;VPN Connection
Menu, MyMenu, Add, VPN, VPNHandler

return

Type

Defines within AutoHotkey what we are creating


Menu Name

In each script, you could create multiple menus and so we have to name our menu to differentiate it from any others we may create.


New Menu Item

Here we define what we are doing with this menu item. Are we creating a new menu item (Add)? removing an old one or inserting one in an already established menu.


Menu Item Name

This is the name of the menu item and is what will be displayed when our menu is presented to the user.


Action to call

At this stage, all we are doing is creating the menu. None of the menu items have any behaviour attached to them. The action to call is a link to a function which is located later in the script. It is those functions that tell the system what to do when the user presses a menu item. This action to call can be anything you want it to be.


Menu item Functions

Below I have pulled out one Function from each of the groups i.e opening folders, launching applications, opening URLs etc.


In the portion of the script, I showed you above you can see that we defined an ‘Action to call’ at the end of each menu item. The ‘Action to call’ tells the system which Function to run when the menu item is clicked. Below are some of the functions and you can see that they all start with the ‘Action to call’ which links them to their corresponding menu item.

;;;;;;;;;;;;;;;;;;;;;		Navigate to Folders 		;;;;;;;;;;;;;;;;;;;;;

BlogHandler:
	run, "E:\\Dropbox\\Projects\\Blog"
return

;;;;;;;;;;;;;;;;;;;;;		Run URLs 		;;;;;;;;;;;;;;;;;;;;;
FWHandler:
	run, "<https://fourth-wall.co.uk>"
return

;;;;;;;;;;;;;;;;;;;;;		Run Programs 		;;;;;;;;;;;;;;;;;;;;;
SpotHandler:
	 Process, Exist, Spotify.exe
        If Not ErrorLevel
        {
	        Run, "C:\\Program Files\\WindowsApps\\SpotifyAB.SpotifyMusic_1.192.647.0_x86__zpdnekdrzrea0\\Spotify.exe"
        }
        Else
        {
            WinActivate, ahk_exe Spotify.exe
        }
	Return

;;;;;;;;;;;;;;;;;;;;;		Connections		;;;;;;;;;;;;;;;;;;;;;
VPNHandler:
	run C:\\WINDOWS\\system32\\rasphone.exe


Folders

run, "E:\\Dropbox\\Projects\\Blog"

This is a very simple script in AutoHotkey. All we are doing is providing a path to a specific folder in the file system. All you need to do here is change this path and AutoHotkey will launch your folder.


URLs

	run, "<https://fourth-wall.co.uk>"

URLs work in a similar way to folders so again all that needs to be done here is to replace my URL with your own.


Programs

Process, Exist, Spotify.exe
        If Not ErrorLevel
        {
	        Run, "C:\\Program Files\\WindowsApps\\SpotifyAB.SpotifyMusic_1.192.647.0_x86__zpdnekdrzrea0\\Spotify.exe"
        }
        Else
        {
            WinActivate, ahk_exe Spotify.exe
        }

Launching programs is very simple but if you’re not careful AutoHotkey will just open up multiples of the same program, even if you already have something running. Therefore this script is a little more complicated.

We first check to see if a program is already running.

Process, Exist, Spotify.exe

You can find the task name of your program by opening Task Manager and taking a look at your program name there

After checking if our program is running or not we will have one of two responses. It either is running or it isn’t. Therefore we have two operations to carry out. If the program is not running we launch the program. You can simply change the file path that points to the executable of the program you wish to launch.

 If Not ErrorLevel
        {
	        Run, "C:\Program Files\WindowsApps\SpotifyAB.SpotifyMusic_1.192.647.0_x86__zpdnekdrzrea0\Spotify.exe"
        }

If the program is already running all we need to do is bring the program to the front of the screen. Again, to alter this all you have to do is provide your executable which we found in the task manager earlier.

  Else
        {
            WinActivate, ahk_exe Spotify.exe
        }

Connections

	run C:\\WINDOWS\\system32\\rasphone.exe

Nothing to change here. This simply launches an interface which you can use to connect to a VPN quickly.


Keyboard Shortcut

+^r::Menu, MyMenu, Show

Finally, we have the keyboard shortcut that we use to launch the menu. In the example above the shortcut is everything before the double colon "::" i.e. "+^r"


You can change this to suit yourself. If you want to understand what key each symbol represents, have a look at this documentation page.


And that's it. That's my version of contextual computing on Windows.


Wrap up

Contextual Computing is all about maintaining the flow state and getting your work done. It does this by eliminating diversions, distractions and delays all through a system that feeds you exactly what you need, when you need it.


I have been implementing this method for about a month or two now and it has become an extremely important aspect of the way I work. Using applications such as Raycast or Alfred are great but Contextual Computing surpasses both of these by not only launching the application you need but by taking you directly to the end goal in the application itself.


Let me know your thoughts on this process and if you have any suggestions or improvements I would love to hear them.


As always, if you could like, subscribe and share the post, it really helps me out and again, only do so if you feel the content is worth it 😁


Cheers!

339 views0 comments

Recent Posts

See All

Comments


Subscribe and never miss a post

Thanks for subscribing!

bottom of page