Page 1 of 1

Finishing Simulated keystrokes!!

Posted: Tue Jan 01, 2019 4:38 pm
by guzaarish
Hello! I've had a problem that I think might actually be unsolvable with XMBC. I can use xMouse effectively to do almost any simulated task that I want except for this: Repeatedly toggle a button & upon release of the button, complete the code.

Can XMouse not finish the code in this situation? I have the simulated keys set to "repeatedly while the button is held down".

The overall goal is to blink a light repeatedly while I am holding down a mouse button. The code must toggle "on" & "off" the light repeatedly, but once I let go, it should press the final "off" toggle. Right now: after holding down the button, the light will blink dozens of times. After I let go of the button, sometimes the light will stay in the "on" position, & sometimes the light will stay "off".
Top

Re: Finishing Simulated keystrokes!!

Posted: Wed Jan 02, 2019 3:09 pm
by phil
You *might* be able to do this with the new functionality in 2.18.
It allows you to specify actions for the inital press {press}, during repeat {repeat} and when the button is released {release}

So you can prefix the simulated key (each one will need a prefix) such as {press}/{release}/{repeat} and that way you can tell XMBC that it must execute particular keys when {release}ing - this can in theory be a different key, but it could also be used to make sure that the off command is always sent.

If you need more information, give me a shout.

Re: Finishing Simulated keystrokes!!

Posted: Thu Jan 03, 2019 1:19 pm
by phil
Sorry, got the wrong tags...
The new tags in 2.18 are {OD} {OR} and {OU} and they allow you to specify what "keys" are sent when the button is pressed down ({OD}) when the repeat sequence is sent ({OR}) and when the button is release ({OU}).

So you can force something (anything) to be sent when the button is released by prefixing each item with {OU}. These items will not be sent when the button if pressed or the sim key sequence is repeated.