Is there a better (faster) way to do this?

Below is a simple macro that types the letter “a” only after the space bar is released.

I'm happy to explain why this is useful for me if necessary.

What I want to do is set up this macro for every letter. So, “b” is typed when the space bar is released... Every letter should be typed only when the space bar is released.

Does anyone know how to do this for all letters (a quick way) using one macro? Thanks!

Edit: To clarify: How do I tell KM to simulate “a” when I type “a” and to simulate ‘b’ when I type “b”?

I don't know how quick this is to setup as it requires 26 actions but it will work (i.e., %TriggerValue% will take on the value of the trigger than launched the macro) and it will be in one macro.

Replace the Type A Keystroke Action in your macro with the below noting you need to continue on to Z.

Hope this helps.

If you don't require a simulated keystroke and can use "Insert text" instead, have Typed String Trigger matching on a regex?

What I'm not sure about is how well this'll work if the Space key is already down (which it must be since your macro waits for it to be up) -- but I can't see how your macro is working in that situation either :wink:

Can you confirm your attempt works for a couple of letters, ideally uploading a working version, and that you're just trying to avoid adding 26 triggers and a 26 entry "Switch/Case"?

Thanks @Joel !

And thanks @Nige_S what you suggested works as it should... but the entire text shakes when I type. It feels really tiring :weary_face:

Edit: Sorry, correction—what you're suggesting doesn't actually work. What I posted does.

Edit 2: Ah, maybe it's time to explain a little more. The idea is to “combine” the “a” macro with this one.

Space is typed when the key is released. Normally, “a” would be typed before the space in this case if the keys are pressed in quick succession. ... because the timing is off.

With the “a” macro, KM seems to wait and types in the correct order. Does that make sense?

It may help to explain your objective—there may be an entirely different way to accomplish what you want.

-rob.

2 Likes

Thanks, Rob. In the meantime, I've set each letter individually. Let me spend a few days testing to see if what I want to do actually works :slightly_smiling_face:

1 Like

The case statement solution I posted is exactly that only in 1 macro as you requested. That said, @Nige_S 's is fa more surgical.