Do you know any alternative software other than Better Touch Tool?
There is a utility for the Mac called Better Touch Tool.
Among its features is a function called key sequence. This triggers when you press any key.
This feature is more flexible than Keyboard Maestro's hotkey triggers. For example, entering the number "01" can trigger.
But there is a big problem. This software is very buggy and it freezes frequently.
Have you explored the Typed String Trigger?
Here's a very basic macro that will do this task in a simplistic manner.
- One could build more keys into the scheme.
- The method could be played with.
This is a task just waiting for someone with sufficient web programming skills.
I suspect a Custom HTML Prompt action could be set up with a key listener that would actually display the key of the activation chord as they were pressed.
This might also be accomplished with a Keyboard Maestro palette, but I'm not going to dive in that far.
QuicKeys 4.5 used to do asynchronous key chord triggers wonderfully well, and I wish Keyboard Maestro would do it natively. Alas – the developer doesn't want to go there (so far).
Hotkey Plus Additional Two Keypresses to Trigger Macro – Chord – Example v1.00.kmmacros (11 KB)
Yes and no.
BTT is developing very fast. Completely new features are added every week. This has a price. The developer of BTT releases an update almost every day. So almost all bugs are removed very quickly.
The question is, would you rather wait 3 years for a new feature until everything is completely stable? Or do you want it much faster with the risk of bugs?
And what does "frequently" mean? I have been using BTT for years and almost never have crashes. I suggest to use the regular updates. Index of /releases
That is certainly a possibility. But BTTs "Key Sequences" are MUCH more powerful.
I would also recommend that. A shortcut opens the palette, then a single key trigger is sufficient.
Actually I was talking about displaying the secondary, tertiary… keystrokes.
But what Frank is suggesting is eminently possible.
It would not be difficult to use one or more conflict palettes or a purpose-designed palette with specific keystrokes.
It would also be possible to layer them, so palette 1 is displayed by the initial hotkey trigger – palette 2 is displayed by activating a macro on palette 1 – and go as deep as you want.
Thank you very much! Very nice macro.
But I was too amateur to understand the structure. Could you send me a screenshot of an example where you type "01" and trigger a certain macro?
Thank you. But I would like to achieve a bit more flexible keystrokes. For example, triggering without using modifier keys. I thought of using Alfred as an alternative. But it also depends on the modifier key, just like km. I want to use Photoshop and Illustrator, so having them really helps.
Thank you! Your idea is probably the best one. However, searching for a stable version is a very painstaking
I think there is a misunderstanding. What @noisneil suggested works without modifiers. With KM "typed string triggers" you can (to stay with your example) type "01" and expand it to something else. This feature is basically the same as a BTT "key sequence" just less powerful.
Yes, It seems like I misunderstood as you said. Thanks for kindly pointing it out.
And thank you so much your advice @noisneil
My macro in Post #3 doesn't use a Typed String trigger.
It uses a normal Hot Key trigger to start the macro and then accepts additional keystrokes – in this case 'J' and 'L' in succession.
The macro activates System Events (an invisible background app) to prevent keystrokes from disturbing other apps.
Typed string triggers are for text insertion macros. Although some people use them more generally, there are pitfalls to doing that – because the keystrokes flow through to whatever app you're working in.
@ccstone is right. His method is more secure because it does not pass letters to the front app.
The question is, how should you start the macro if you don't want shortcuts with modifiers?
I can only think of a long press single key trigger. You can do that with a multipress macro or with KM's built in version of it.
To stay with the current example: Long press "a" triggers the macro, then type "j" and "l".
This has some drawbacks too, unfortunately, but it should come closest to your needs.
Ah, @ccstone what happens if the wrong letters are pressed? Or in other words, how do you abort the macro?
Understood. Thank you. It's a macro for bug fixes, isn't it? I learned a lot. This macro was really difficult for me, so it was a very good learning opportunity
It's a simple example, so one can pretty easily test and find out...
- Wrong letters will be ignored.
- This simple example macro has no method to cancel it. (That is an exercise for the user.)
- However – there are several ways of exiting the macro.
- Have a global macro Kill-Switch.
- Add a timeout to the pause-until actions.
- Add the Escape key to the sequence keys as an OR option and then provide a method to cancel the macro.
I have turned the sound off in the Macro, because keypresses activate the system error sound. That has to be managed if you cancel the macro.
@peternlewis – I'm finding myself wanting something like a
%KeysPressed% token – or a means to customize the
%ActionResult% of a given action.
%KeysPressed% would let the user pause-until pressed-keys change and provide all manner of comparison options.
Another possibility might be to add
key-condition to the Switch action.
If you can think of a better way or a method already existing please let me know.
Yes, "one" could. But most are not as advanced as you are, and you certainly don't want to discourage igh_033 - or me
Yes, that's how I would have done it too. Thanks @ccstone
Perish the thought.
But testing and figuring things out is how I got to be advanced...
Probably a stupid question. Is there any way to see what you are typing? I was thinking of a prompt or "trigger macro by name", but after that you always have to press enter, which is not desired.
To stay with the example, type "j" and "l" and see it and once KM has recognized that this string "makes sense" (is a trigger) run the macro. So, similar to a "typed string trigger".
There may be a neater method but if not you could always include activating KeyCastr as part of the macro.
I think @noisneil's idea is about as good as it gets.
It would probably be possible to do this with a Custom HTML Prompt action, but you'd have to have some serious web programming chops.
I think using it as an input device has some real possibilities.
The only other way I can think of that's reasonably simple is to use palettes that give the user visual cues of pressable hotkeys and offer unlimited depth of travel.
I.e. the primary macro opens a palette – the secondary keypress closes the first palette and opens another palette – ... until you reach your destination action(s).
KeyCastr Interesting, I'll have to test that.
The palettes idea is not bad. But you would only see the "j" on the first palette and the "I" on the second.
Anyway, it doesn't need enter as a trigger, hmmm... But isn't that a nightmare to build and maintain?
Thank you both @ccstone @noisneil