Add a delay between simulated keystrokes

x64 Replacement/Alternative to Microsoft's IntelliMouse application.
Forum rules
Please read the forum rules before posting for the first time.
The more information you can provide, the quicker and more accurately someone can help.
NOTE: To reduce spam, new users can not post links, files or images until they have at least 4 posts.
Post Reply
styx616
New User
Posts: 4
Joined: Fri Jan 06, 2023 8:35 pm

Add a delay between simulated keystrokes

Post by styx616 »

Please fill in this template when posting!
XMBC Version: 2.192
Installed or Portable version: Installed
Windows Version: Windows 11
Mouse Information (brand/model): Logitech MX Master

Hi everyone!
I'm using XMBC to bind my left click onto mouse wheel down when playing Path of Exile and it's a blast so far, thanks for that!
Transfering items from the stash to the inventory and back requires a lot of clicking and I'm really happy that this can be solved with XMBC.

I ony have one problem: If I "click" too many times, I get kicked because I performed "too many actions", so I guess I need to add a small delay between the simulated mouse clicks of XMBC.
I tried the de bounce function in the settings and the delay between simulated keystrokes.
The first option makes my mouse behave weird if I use it and I guess it's not meant for what I want to achieve.
The second option is capped to 60ms, which still kicks me out of PoE.

Is there any way how I can add a 200ms delay or so?

Thanks!
User avatar
phil
Site Admin
Posts: 7670
Joined: Sun Apr 06, 2003 11:12 pm

Re: Add a delay between simulated keystrokes

Post by phil »

in the simulated keystrokes, add {waitms:200} after the key?
Beware though, it will still queue and send all the clicks - just more slowly. Unless, maybe if you add {FLUSH} at the beginning to prevent this (but Im not sure it will have the desired effect!).

Give it a go and see what happens!
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9/G604/M720/MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, AMD Ryzen 5900x, MSI x570 Tomahawk, 32GB DDR4,
nVidia RTX 2070s, Evo 970 1Tb NVME, 2x2TB WD Black (RAID1)
styx616
New User
Posts: 4
Joined: Fri Jan 06, 2023 8:35 pm

Re: Add a delay between simulated keystrokes

Post by styx616 »

Thanks for the fast answer.

I tried both, but that's not the desired solution.
I want it to send left clicks as long as the mouse wheel spins but stop when I stop it.
Now - even with flush - it just sends endless clicks for a minute or two ;D
User avatar
phil
Site Admin
Posts: 7670
Joined: Sun Apr 06, 2003 11:12 pm

Re: Add a delay between simulated keystrokes

Post by phil »

Its always tricky with the wheel because it can send sooo many messages very quickly.
I wonder if a more nuanced approach is needed here....

What you could try, off the top of my head, is this....

1. On the options tab, turn ON "Ignore repeated remapped vertical scroll". The default delay of 200ms should be OK but you could play with that later if not...

2. In simulated keystrokes for wheel down, set {LMB}{WAITMS:200} and choose METHOD 6 (repeat while the button is down)

My theory is this... The wheel does not send a button down/button up message, just a scroll message. But in step 1, you are effectively saying, when you get the first scroll message, treat is as button down, and after you haven't seen a scroll message for 200ms, treat it as a button up - thus the time between the first scroll and 200ms after the last scroll will be seen as "button pressed down"...

Now, in step 2, you have setup simkeys to repeat your left click (with or maybe without a delay - play with that) while the button is "down" as above... So while you are scrolling, it should repeat the left click, but not for every scroll message.

It makes sense in my head but I havnt tried it and the theory does not always work in practice. You may have to play around with the delays (in step 1, and the wait ms in step 2) but give it a try and let me know how you get on.

Thanks,
Phil

PS, I cant promise all responses to be this fast (esp. as I'll be out over the weekend!) :)
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9/G604/M720/MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, AMD Ryzen 5900x, MSI x570 Tomahawk, 32GB DDR4,
nVidia RTX 2070s, Evo 970 1Tb NVME, 2x2TB WD Black (RAID1)
styx616
New User
Posts: 4
Joined: Fri Jan 06, 2023 8:35 pm

Re: Add a delay between simulated keystrokes

Post by styx616 »

Hmm sadly option 1 does not work at all, somehow it does not click anymore with this setting.
Option2 doesn't seem to respect the wait tbh, I set it to 800ms and it clicks as fast as initially.

Maybe the problem is my logitech mouse which has an "unlocked" wheel option where it can spin freely.
User avatar
phil
Site Admin
Posts: 7670
Joined: Sun Apr 06, 2003 11:12 pm

Re: Add a delay between simulated keystrokes

Post by phil »

They were not options, they were steps.
2. wont work without first doing 1!

I just tried it here (sending 'a' rather than {LMB} with no {waitms} tag.
However, I did have to set the repeat delay to something other than 0 (50 seemed to work). And I had to increase the ignore remapped vertical scroll to 400ms rather than the default 200ms (this can be quite device specific, so as I said before, you may need to play with the delays).
Untitled.png
This worked - it typed a repeatedly while I was scrolling (including super fast scrolling on my Logitech mouse in free wheel mode), a was repeated as a consistent rate and not completely spammed out!

I have no other ideas, so if you cant get it working for you, I don't know what else to suggest!
You do not have the required permissions to view the files attached to this post.
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9/G604/M720/MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, AMD Ryzen 5900x, MSI x570 Tomahawk, 32GB DDR4,
nVidia RTX 2070s, Evo 970 1Tb NVME, 2x2TB WD Black (RAID1)
styx616
New User
Posts: 4
Joined: Fri Jan 06, 2023 8:35 pm

Re: Add a delay between simulated keystrokes

Post by styx616 »

This works very nice thanks!
Post Reply