Idea: make Prompt Workflow faster and handy for single-hand keyboard manipulation

Snipaste_2020-11-04_20-04-41

As you can see in the picture.

【1】When I am using prompt of K.M., the process is:
press shortcut for calling up --> show the prompt --> input a text(usually a character) --> pressing enter key means for 'OK' --> FINISH

【2】When I am using prompt of other app, for example, Hammerspoon, the process is:
(Notice that it had already assumed that the prompt would receive a single press for a character)
press shortcut for calling up --> show the prompt --> press a character --> FINISH

Obviously, the process 【2】 is shorter and it is handy for single-hand shortcut/keyboard manipulation.

What I want to do is to create an special version of prompt of K.M. working faster benefiting from process 【2】.

Well, you could take another approach and do this:

KM 1 2020-11-04_12-24-05

where pressing "F" sets %PromptButton% to "Finder" etc. so you can test that after the action and act accordingly.

Achieve this using this version of the Prompt action:

KM 2 2020-11-04_12-24-54

Notice that, for example, the Finder button has "/F" after it, which sets the "shortcut" for the button to "F".

Oddly, pressing "C" doesn't set up Chrome, but Enter does.

Not exactly what you want? - then read the wiki documentation on the Prompt action here Prompt For User Input

1 Like

Yes, just something like this.

And it's weakness is just as what you introduced.

And for example, I need to customize a list of app to launch. For this, creating so many buttons is weird.

I've known about HTML coding. But in the document below, there is not way to bind an event listener for single keyup or keydown, right?

https://wiki.keyboardmaestro.com/action/Custom_HTML_Prompt

Yes, many buttons is weird!

Apologies if I'm missing something, but David Sparks' KM Field Guide recently included this kind of functionality. He suggests intentionally using the conflict palette, and I've found it to be very helpful. There are several ways you can do it, but basically if you give a bunch of things the same shortcut, you just then type the next letter to get the one you want. Two keystrokes.

For example, I have several under SuperMetaKey (Karabiner-hacked Caps Lock)-N. The N stands for "new document" in my mind. So CapsLock-N brings up a conflict palette for Drafts and Obsidian. Which do I want? I hit D for Drafts, O for Obsidian. No [ENTER] key.

CleanShot 2020-11-04 at 07.47.52

I have another one for when I want to write some code. CapsLock-C

CleanShot 2020-11-04 at 07.52.17

Since TextSoap and TextExpander both start with T, I could rename those shortcuts to something unique if it really bugs me, or make a duplicate of those macros with a unique name, or just type the next letter. In this case, it would be a pain because I'd have to type 5 letters to get to something unique. But in those rare cases I just grab the mouse. I should really just call TextSoap "Soap" so the initial letter would be "S".

5 Likes

Definitely a better approach than the one I suggested.

Yes, I would try this. It seems perform well in mostly demands.
Thanks a lot.

1 Like

Use a Conflict Palette.

Create 4 macros, one for each of your applications, and give each of them the same hot key trigger.

Keyboard Maestro will handle the rest for you automatically.

2 Likes

Yes, the reply above had introduced Conflict Palette.

And for more complex condition, I might use Spotlight Search Prompt rather than original prompt for input.

In these situations, pressing a number key corresponding to an item's place in the palette also works. In that example, 2 would select Text Soap and 3 would select TextExpander.

4 Likes

I did not know that! Great, thank you!

Correlatively, the tool below can automatically add sequence inside a palette, which is I am trying to.

https://forum.keyboardmaestro.com/t/macro-palette-organizer-v1-2-updated

1 Like

Thank you for telling me about numeric position. I had been making one of mine ugly by showing numbers. (And if I ever rearranged them I’d have a spot of trouble - with my attempt.)

The technique demonstrated here: https://www.youtube.com/watch?v=Vjn5BmhVF6M using BetterTouchTool gestures and palettes is interesting. The video is in German, but the visuals are very clear. Alexander seems to post on these forums quite regularly.

1 Like