I think I know but. Can HID remapper wait for a window to open (or can I put in a delay)

OK, I think this cannot be done, I have tried and failed so I come here to find out either way.
First, HID remapper this does everything I wanted it to do, but now I push that envelope and it fails this part.

What I am trying to do:
I assigned a button on my external USB keyboard to call the Macro below:
I have, with help here, made a macro that sends:
(leftGUI) + R m a i n . c p l (ENTER)

This opens the Mouse Properties on Windows

So Far, perfect

Now I want to enter T and (ENTER)

I can do that manually or with another macro and another key assigned to invoke the macro .

BUT, can I chain this on to the end of the first Macro and save that extra keypress?

I tried pauses, nothings and then the sequence I want all to no avail.

I am happy enough to be told no as I can stop messing about, even happier if it can be done.

SO, HID remapper, wonderful and does all I wanted, but can it do this?

To do this with a macro, you would need to increase the duration of macro steps in the settings, then add Nothing steps.

There is an explanation in the Macros section of the documentation.

Alternatively, you can build an expression with a countdown. I can’t help you with this, as I’m only just learning expressions and haven’t quite figured it out. The expression builder might be helpful, but again you’ll need to read the documentation.

1 Like

That’s right!

There’s some discussion of using expressions for delays here:

https://github.com/jfedor2/hid-remapper/issues/134

2 Likes

Thank you, I have made macros and have read through the manual but will study a bit more, Thanks.
If all else fails ??

Also I like the other reply as it may point to an alternative solution.

The re-mapper is a beast, lots to learn and so very useful.

I see this now, it looks complex but I will study and see it if helps, Thank you.

For future reference, with help requests like this it’s always valuable to show your work so that people can help troubleshoot it.

For expressions, you can wrap them in code tags </> so that they’re easy to read. In other cases, screenshots will do (just not expressions).

You can also export your JSON and attach it to a post. Then we’ll be able to import it and see exactly what you’ve done.

1 Like

That make sense, Thanks.
I will work on what advice I have been given and then do that.

OK, thanks for the help so far.

Progress.
I have increased the Step rate to max and it works (most of the time). It also solved an odd fault where the Macro only seemed to run every 2nd time, (yes, I needed a delay for the window to open ).

So, it is slow, but works, I should be happy. :slight_smile:

Now I need to get back and try to understand how to get a delay in to the macro using expressions.
This will take time I think as I am not yet understanding how an expression can be “called” during a macro.
I will play.
So, so far, the help has been amazing, I am yet to be kk.

I have attached my json as requested.

The issue is on the “C” input.
I need a delay at the start (I now know).
A second delay after the macro (2) has issued the “open Mouse Properties command” (main.cpl ENTER|) so it is there when the next text is sent.

As I say, it works with the step set to 254 ms but that seems so crude.

So, expressions, a delay and then how to make it happed during a macro.
I am not looking for you to just do it for me.
I am trying to understand, Thanks.

hid-remapper-config with extended delay 20250825 1234.json (6.1 KB)

If it bothers you that the typing is slow now that you’ve set the macro step duration to 254ms, you can set it to some lower value and insert multiple “Nothing” steps instead.

“Pause” is just the Pause/Break key on your keyboard, it’s not a delay.

An expression cannot be called from a macro, an expression also doesn’t do anything by itself, it just does some calculations and the results can be used in mappings, either directly or through a register.

Thanks, I will try that now.
I am really happy you told me about the expressions and macro (not link) as it was taxing me a little so I am sort of happy I had not missed something.

Does it bother me? sort of, so I will add some nothings with a lower pause value. :slight_smile:

Got it, Thank you.

Faster and a lot of nothings,

Thanks again.

((expressions are for another day now))