 If you want to level up your Mac productivity, then stick around because in this video, I'm going to be talking about how you can use TextExpander, Keyboard Maestro, and Stream Deck together. Hello, welcome to Take One Tech, my name's Alec. And in this video, we're going to be basically combining three of my favorite productivity tools. Now, I did a beginner's guide to Stream Deck, so you can find that in my Stream Deck playlist. I'll leave a link up in the top corner. I also did an introduction to Keyboard Maestro about a week ago, and so I'll leave a link to that video in the top corner as well. And just yesterday or the day before, I can't remember now, I did a video about TextExpander, and that was kind of an introduction to that piece of software, so link up in the top corner as well. And the point of those two videos for TextExpander and Keyboard Maestro is that they are intended to be an initial step in building out a sort of beginner's guide and then moving on to an advanced productivity guide where I basically combine all of these things. Well, that was the plan, but somebody's actually asked how to use these together or specifically how to use TextExpander with Stream Deck. And the way I do it actually involves Keyboard Maestro as well. So I thought, I will just jump ahead a little bit to answer this question, and it'll give you a bit of an insight into what is possible. And then I'll go on to do all of the rest of the introductory videos for TextExpander and the Keyboard Maestro. And then, yeah, as I say, I'll be building this all out into a whole series of workflows using these tools, but then also combining them with things like Moom and also Apple Script and also Apple's Automator program as well. So let me start by just refreshing on where we left off with the TextExpander video. So as I say, if you haven't watched that, then you can see that I linked to it previously and also it'll be in the description as well. But I will just recap on exactly what was done in there because I'm gonna show you how you can trigger these things with Stream Deck as well because I do use TextExpander and have some of my snippets triggered with Stream Deck. So let's have a look at how to do this. So I'll come into my screen sharing and immediately share the wrong part of my screen. This is the one that I want to share. So this is TextExpander and these are the little examples that I created in the last video. So we had an initial snippet which just to refresh your memory if you didn't see it as well was if I type F comma comma, it automatically expands out to put a date stamp which I'd specified here. So that's taking the actual date and then also a bit of text afterwards. There was some other ones that I did in there as well. So we'll come on to those as well. In fact, the other two, the next two were really just more of the same really. So a little snippet of text expanding to some more text. The last one though, the one that I did with the company information that was a bit more interesting and let me just give you a quick preview of that one. And we'll get on to doing both of these in a moment. So I want to do a new mail and I'm gonna put my mail up there. And the point of this snippet here was that if I come down and grab an email address, this was the example that I used here was if somebody says, can you send me some of your company information? Then we created this snippet. So if they give us their email address then I can just come in here and type a little shortcut which was X comma. And text expander will ask me for the name of the person. So I'll just say that I'm gonna send it to myself. And as soon as I press return, it populates the email address. It went and put the subject in. It tabbed down to the main body of the email. It entered the name of the person that I just put in and then gave the company information, whatever that was. And so then you are free to send it. Well, I'm gonna show you how to take this to the next level because basically we don't need to be doing all this stuff ourselves. We don't need to be pressing return and send and things like that. We can automate all of that using keyboard, maestro and stream deck. And all we need to do is just actually grab the email address and then press a button and it will do the rest for us. So that's what we're gonna automate today as well. But let me come back to the simple one first. So we don't need that. So what I'm gonna do is just come back to this first snippet and show you how I would do that in stream deck. The name of slip my memory completely for a moment there in stream deck. So let's come over to stream deck for a moment because you may think that stream deck itself can do this sort of stuff, this text expansion. And indeed for very basic stuff, it can do that. So let me just come over to the stream deck screen. This is the right screen this time. So in the system section of the stream deck, we have got a thing here, which is text. So if I drag that onto the screen like that, here what you can do is you can give it a title. So I'm gonna call this little test snippet and we could write here, this is a stream deck snippet. I can spell right. So here we've got a little section of text. And so if I bring my little note pad area down here one second, just get it onto this screen. So now if I come down to an empty part of here and I press this button on my stream deck, then it does indeed expand out that piece of text. So it can do some basic stuff, but you are limited with the number of characters you've got. So for example, here you can see that the character limit on stream deck itself is 500 characters, whereas on text expander it's, I don't wanna say it's limitless. I'm sure there is a limit, but I certainly haven't run into it and I do all sorts of things like contracts and proposals and all sorts on it. So you can do a lot more with a text expander basically. You can also do formatted texts and things like that. And you can do more advanced things like I showed you with that email where it basically feels like different fields and tabs through them and so on. So that is why text expander is far more versatile than using the built-in functionality in stream deck. So you may think that in order to trigger a text expander snippet, could we just actually create a snippet in stream deck? And let me just move this out of the way. So you could think if I put in the text here and then I type the snippet, so our little shortcut for that was f comma comma. So if I was to put f comma comma in there, then you might think that by pressing this button now, it would actually trigger the snippet. But the text expander snippet that I used as an example that is. But if I actually press that, all it does is it just puts in the text because rather than typing it, it is just simulating pasting it. So it's not simulating the actual keystrokes and text expander is looking for those simulated keystrokes in order to trigger the text expansion. And it won't do it just by pasting in the values. So this is where keyboard maestro comes in. Now don't worry, this is pretty basic that we're gonna do now in keyboard maestro. So there's nothing too difficult. And I know that some keyboard maestro aficionados are gonna say, why would I be using text expander when actually keyboard maestro can do text expansion? So we could just do it all in keyboard maestro. Well, there is a reason. And that is that text expander is very good at what it does. And so I do all of the things related to text expansion from within text expander. There are a few occasions when I also want these little snippets and these snippets of text and whatever, I want those to be available on the stream deck. So in those few cases, what I do is I create a little keyboard maestro macro that basically triggers the snippet for me. But that way I always know if I need to find my text expander or my little text snippets, I know where they're gonna be. So that is why. But it is true, you could actually do a lot of this in just purely with keyboard maestro and stream deck. So you may think it's a little bit of an extra step, but I'm hoping that it does make sense. So I've got a little dummy group in keyboard maestro. And as I say, if you haven't seen the keyboard maestro video yet, then do go and check that out because I go over the basics of this. But this is as basic as it comes for this first one at least, anyway. So what we're gonna do is I've got my groups here and I've just got a little demo group of macros. So I'm gonna create a new macro. And all we want to do is we want to actually create a macro that's basically gonna type that little string of text. And all I wanted to type in this case, in the case of this particular snippet, is I want it to type this f comma comma. In fact, I'm just gonna come here and I'm gonna actually copy that right now because that's the abbreviation that we want it to trigger. So coming back to keyboard maestro, we don't actually need to put a keyboard shortcut for this because I'm only using this to trigger it from stream deck. So I'll show you how we do that in a moment. So there's no point to create a separate trigger in keyboard maestro because we've already got the trigger in TextExpander. So let's go and add a new action, which is basically, we just want it to type this string of letters. So I'm gonna go to new action and then I'm gonna come in here and just start writing type in the search field. And here we've got a few options. We can either type a modifier key, so that's either command control or a shift or whatever. You can type a keystroke, so that would be if you wanted to simulate typing a keyboard shortcut like command S or something like that or command C for copy or whatever it happened to be. There's also insert text by pasting and that would simulate basically what TextExpander, sorry, that would simulate what stream deck is doing by just pasting a block of text. But this is the one that we want. We want to text, sorry, to insert text by typing. So this is gonna simulate the behavior of you just typing it yourself. So I'm gonna double click on that one and all I'm gonna do in here is add in the text string. So there we go. That is the text string that we've got for our trigger for TextExpander. I'm hoping that this is making sense. So let's give this a name and I'm just gonna call this test again just for, in fact, it was called first snippet was the way that I described it in TextExpander. So let me call it the same. There we go. So we've got a little action in keyboard maestro called first snippet and it's gonna type this string of text T, comma, comma. So if I come back to my TextExpander here, this is called first snippet and it's activated by typing T, comma, comma. So what we're gonna do now is we're gonna use stream deck to actually activate this keyboard maestro action. Okay, so I'm gonna move that out of the way and what we're gonna do is we're going to come into our stream deck and what we need to have is we need to be able to control keyboard maestro from stream deck. So I'm gonna come up to the little plus icon here and what we're gonna look for is there is keyboard maestro. I mentioned this in the introduction video. So there is a keyboard maestro plugin and this is to trigger a macro in keyboard maestro but you can also use it the other way around to have keyboard maestro trigger some of the actions that you've got in your stream deck. However, I don't usually do that. What I do is I'm only interested in triggering the things on keyboard maestro and I have found that there is another plugin that's a third-party plugin called KMLink and there you go. And this is for me much better and you'll see why in a moment. I've already installed it but if you haven't then just click on the install button. Now when you install plugins to stream deck they usually appear down this side. So like I installed Ecamm Live and there we go. We've got the Ecamm Live plugin. I've installed Zoom and the Zoom one is there. Well KMLink is one of these ones that's just only basically got one action and so that is appearing in here this custom a little section. So there we've got KMLink in there. So now I'm gonna add this down to this bottom button and you can see it's got the little keyboard maestro icon the command symbol. And all you do is basically come down to here where it says select a macro and click here and you'll see all of your macros in keyboard maestro and it also highlights the last modified one right at the top. So I'm gonna click on here. So now when I click that button it's gonna activate the macro in keyboard maestro first snippet. And that in turn is gonna type our key string for our text expander snippet. This is confusing me talking through all this one step at a time. I'm usually just flying through it without really thinking. So let me come back to this now and what you'll see is where before it only typed out our string if I just press return onto a new line and I press this little button on my stream deck what you'll see is it does actually type the string and that expands into text as well. So that is exactly the behavior that we wanted. I feel like that was quite a long winded explanation of basically saying we've just created a small little macro in keyboard maestro that simulates the letter sequence to trigger our text expansion. Is that clear? I don't know. It should be clear but it might not be. If there is any confusion about that then do just drop a message in the comments down below and let me know and I'll see if I can explain it any differently. I think I explain the steps but there you go sometimes I confuse myself with these things. Now what we're gonna do is we're gonna tackle something to be honest that is a little bit more advanced because it is gonna get into multi-actions in keyboard maestro and what we're gonna do is I'm gonna come back to that example that I had of that email sequence. So here we've got a sequence that basically takes what we've got on the clipboard and it pastes it and in our case we went into the two field of the mail and then it tabbed down twice to go to the subject and it pasted in the subject that we'd written there and then it tabbed down to the main body of the email and it prompted us for a name. So the name of the person, so we put the name in and then it filled out the rest of the details and completed the email and then we were left to actually finish off the email by pressing return or rather send. So what we wanna do is we wanna actually simulate that whole thing now in keyboard maestro so that all we have to do is actually just copy the email address that we want it sent to and then it will do everything else except prompt is obviously for the name which we still need to put in manually. So let's give this a go, shall we? I'm feeling ambitious. Okay, so if we come back to keyboard maestro what I'm gonna do now is create a snippet that, sorry, a macro that simulates that whole process that we've just looked at. So I'm gonna create a new one and I'm gonna call it the same as the text expander snippet is called which is company info mail as an example. There we go. And now what we're gonna do is I'm not gonna bother with an actual trigger for this because we're gonna trigger it by stream deck but we're gonna add it in a series of actions. Now this is gonna perhaps seem a little bit complicated possibly if you are totally new to keyboard maestro but it is just a series of simple actions. And what we're doing is really still only gonna be just scratching the surface of what is possible with keyboard maestro. But when you are looking at creating these things in keyboard maestro I mentioned on one of my last videos. The point is not really to think about all the things you might want to do with it and then create them all at once and then probably forget that half of them even exist. I'm speaking from experience. The way to go about this is to just find the things that you do in your day-to-day work or productivity or whatever it is where you notice that you are doing the same repetitive tasks over and over again and see if there is a way that you can automate those. And then it's a case of breaking them down into the steps that you take to do them because keyboard maestro can control really a hell of a lot of the things that you do. And if there is a task that you do repetitively on your Mac I can almost guarantee that you can program keyboard maestro to do it. And all it is a case of is is it worth the time it takes you to program keyboard maestro to save you the time of having to do the task in future. And I find if it's something you do more than a couple of times a month then it definitely is worth creating one. So, and you will obviously get quicker at creating macros once you start doing it. But we're gonna go through now and do this process of basically what we wanna do is we've got to copy the person's email address and then we want it to basically when we press our stream deck button it will do almost everything else. The one thing we will have to do is we will have to type the person's name manually. There is a way that we could get that as a separate action but I won't complicate things for now. So what would be the first step that we'd have to do? That's what we need to think about when we're creating these macros. Well, we've copied the email address. So the next step is we need to open mail. So let's go and do that in this macro. So I'm gonna add a new Mac, a new action. And I'm gonna come and search for, you can do open app but I'm gonna use activate because then that's actually the better action to use. It will open it if it's not open and it will just bring it to the foreground if it is already open. So I'm gonna look for activate. So I'm gonna start typing it. And here you can see we've got activate a specific application. And that's what we want because we want to activate our mail app. So I'm gonna click that down there. And now we can select which application it wants. It's defaulted to finder because that happens to be the other active window that I've got at the moment apart from keyboard maestro. So I'm gonna click on finder and I'm gonna change that to mail. So in the process, we've now opened mail. So what do we do now? Well, we need to create a new email, don't we? So how do we do that? Well, the keyboard shortcut for that is Command N. So the same as a new document in Word or whatever other program you're using, Command N is usually a new whatever it is for that application. So Command N is what we want to do. We want to type a keystroke. Now if you remember before, we did write type and what came up was this one, type a keystroke. And that's what we want. That's for when we use keyboard shortcuts. So we're not gonna insert text by typing like we did before just yet. At the moment, we just wanna basically press Command N. So I'm gonna double click that one and then here it's dropped in down here, as you can see. And what we want to do is simulate the keystroke and we don't want return. So let's just delete that out and click in here and I can just type Command N and now we've got Command N. So now in this process, we've opened mail, we've opened a fresh email or started composing a fresh email rather. And when you do Command N in mail, it actually takes you to the two field. So that's the place where your cursor will be when you start a new mail. That's perfect, because that's just where we need to be in order to type our little text expander snippet to start that working. Now if you remember, if I just come back to that, this is the little snippet X comma so I'm just gonna copy that from there and I'm gonna come back to keyboard maestro. So what we want to do now is now we want to trigger the snippet. So we're gonna come to here and do insert text by typing, just like we did in the first example. And I'm just gonna paste in that little snippet of text. Now if you remember what is gonna happen now, when we're in a new email and we press the little keystroke, it's gonna actually bring up a little pop-up where we have to enter the name of the person and then we press return to continue to actually paste in all of the different fields and that's what text expander does. Now there is something to be aware of with keyboard maestro and pop-ups because that can actually sort of break the chain because keyboard maestro is sort of waiting for an input and that can be the same like if you're doing things like using keyboard maestro to shut down programs, for example, if you try and shut down a program where you've got unsafe changes and it gives a pop-up then you have to be aware of that. There's a little work around for this which I'll tell you in another video but it will actually sort of stop the whole chain of events. So we want to allow for this and so the way that we want to do this is we know that we're gonna be basically having to do some action here because we've got to put the person's name in and then press return. So basically we want a keyboard maestro to just pause for a while to hold on until we've done our bit. So fortunately there is a keyboard maestro action for this so if I type pause and we want to not just pause indefinitely we want to pause until basically we've finished doing our thing. So I'm gonna click on this one pause until okay and it says here pause until all of the following are true. Well all we're waiting for is basically we're gonna type the name and press return. So really the only thing we're waiting for is until return is pressed. Now I can click on this add condition. Now let me just move this up here a little bit. There are quite a lot of conditions to choose from and this just shows you how versatile keyboard maestro can be because there are so many different ways that you can program this. It's also the reason why some people find it a bit daunting because there's almost too much choice. Well what we want is we basically just want a until a key is pressed. So we're looking for a specific key condition and the key condition we're looking for is as I say until we press return because once we've pressed return then we know we will have entered the name and then we're pressing return because we're ready for text expander to continue to populate the email. So I'm gonna come here and the key that we're looking for if I click in here and press that is now saying return and the state we can either have is either up or down. So it's when it's down. So as soon as we press return we basically want to on pause this routine that we've got here. So we're gonna do all these steps and then when we get to here keyboard maestro is just gonna wait for us till we press return and then it will carry on doing its thing. So what do we want it to do next? Well, if you think about the steps in the process where we are, we've now with text expander because that's what we're simulating we've now gone through the process of initiating the text expansion the pop-ups come up we will have put the name in and pressed return and then text expander, if you remember will then go through and put in the email address it will tab twice to put in the subject and then it'll tab again to the body and then it'll put in high with the name that we've entered and put in the body of the email and ordinarily we would have to then send the email. So all of that doesn't happen instantaneously there is a bit of time that it takes after we press enter for it to populate all of those fields so although we've stopped it from it's unpaused in keyboard maestro we do want to have a bit of a delay before we actually try and send the email because otherwise all of the information won't be there it only takes about a second to for text expander to pop it populate it but I'm just going to add a bit more of a delay in there so I'm going to come over to here and just add delay and here what we want to do is an action delay because this pause is technically an action and then we've got another action which is going to be to send the email but we want to delay between the pause and the send if that makes sense so I'm going to click on action delay here now it only takes about a second to populate all of the information but just to be sure I'm going to allow three seconds because that's long enough that it will give it plenty of time for text expander to fill out all the details but it's not so long that it will feel like we're waiting for it to do its thing now what we want to do is here we've got this delay but we want to actually have a delay between actions so we can select a few different things here and we just want to select between actions so set a delay of three seconds between basically this action and the following one and the following action that we're going to add is basically a keyboard shortcut again because there's a keyboard shortcut in mail to send the mail which is command shift D so if I come over here and I just come to type again we're going to use this same thing that we've used before up here and we're going to type keystroke and the keystroke we're going to write is if I just come and click in this box and put command shift D now that is it essentially so that might have been a little bit tricky to follow I don't know, maybe not but let's just have a look at what it's doing and bear in mind the process that we're going through we've copied somebody's email address we've got a text expander snippet that will do all this business of pasting it all into an email but we want to automate this so that we can trigger it with our stream deck so we will have copied the email address and we press our button which we're going to program in a moment and keyboard maestro is going to open mail it's going to create a new email it's going to trigger the text expansion it's going to wait until we've typed in the person's name and press return and once we've pressed return it's going to wait again for another three seconds while text expander fills out all the details of the email and then it's going to press command shift D for us to actually fire off the email right, so with a bit of luck let's move this out of the way and I'm going to create a button for this so I'm going to come over to here and I'm going to use my KM link button again and I'm just going to call this one mail just so that we can see which is which now that we've got two of them on there and then we're going to come down to the macro and we want to trigger and if you remember the last modified macro always comes up so that's handy the company info mail so that's hopefully going to do what we want it to do so let me come over to another part of the screen for a moment I've got our email address here so I'm going to copy that let me just close this down and I'll just minimize this as well now if I press my button let's see what happens so I'm going to press the button it started a new mail it's triggered the text expander snippet it's waiting now for me to type the name of the person in so I'm just going to type my name doesn't matter what I type and now when I press enter it gives it time for text expander to work and then after three seconds it sends the mail so all I actually had to do there was I copied the email address I pressed the button and then I entered the name of the person and pressed return and then that's it it did everything else for me like I say that might have sounded a little bit complicated but what I want you to remember is it only took me however long I don't know 10 minutes to actually program that and once you get used to the sort of process and the flow of it then you'll find that you can actually create these quite quickly and that can save you all of that time going forward so 10 minutes spent now I've got macros like this that are set up and I've got some that are a lot simpler and some that are far more complicated but I spent a bit of time sort of figuring it out once and they have saved me I'm talking about literally days and days and days of work when you add it all up when you start doing these things regularly it's literally saving days out of your life it's quite frightening when you start to think about how much time you spend doing some of these things I will do some more advanced ones than this as well a little bit further down the line but I'm hoping that that very sort of simple example that I gave to start with and this slightly more complicated example just sort of start to make you understand these sorts of things that are possible with it because it really is one of those things that your mind is the only limitation once you start getting into it because you can really do all sorts with text expander and sorry with keyboard maestro you can have it simulate clicks on a particular part of the screen you can have it open a website go to a particular field on the website enter information go to grab other information it's like it really boggles the mind what you can do with it but I'm hoping that that shows you how you can use keyboard maestro and text expander and the stream deck together with those sort of three little parts working together it allows you to activate these things quite simply from stream deck like I say once you've set them up once just duplicate them and change the actions that you want to trigger with them I hope that helps if there are any unanswered questions or it is raised further questions then please feel free to leave them in the comments and if you've got any specific use cases that you would like to say yeah but how about this or how about that leave them down in the comments as well I'm more than happy to make these videos specific for particular use cases in fact a lot of the videos I've made recently have been because people have specifically reached out to say how do you do this or how do you do that so if you are asking the question believe me, there will be hundreds or thousands or millions of other people asking the same not on my channel there'll be about no more than well I think it's 372 maximum at the moment but there you go speaking of which, if you haven't already subscribed look at that for a segue hey, ever the professional go down, hit the subscribe button also turn on notifications so that you get alerted the second I release any more keyboard maestro goodness to the internet and this is going to form the basis of as I say, a whole series of Mac productivity videos as well so I'll leave a link to the playlist for all of these related apps as well over on the right hand side don't go anywhere there's plenty more coming up not least that playlist but there'll be another video up for you in the top right as well