button release premature ends key sequence?

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
sparkster171
New User
Posts: 3
Joined: Mon Apr 17, 2017 8:03 am

button release premature ends key sequence?

Post by sparkster171 »

in my program I would like a button to do double duty if I hold the button down longer that usual.
for example (in the Simulated Keystrokes window): k{WAITMS:800}{CTRL}k
but it seems that the options will perform the full sequence no matter how immediately I release the button.
Is this not a feature or am I missing something? do I have to resort to layer switching (and back) for a simple holding? I searched "macro halt" "macro premature" "premature" "sequence end" and others.

:hide: (just hitting all angles here)
If this isn't an option, can it be #10 in the "how to send the simulated keystrokes" pull-down menu?
"10 As mouse button is pressed until released"


cheers to all!
Last edited by sparkster171 on Sun Apr 23, 2017 3:50 am, edited 1 time in total.
User avatar
phil
Site Admin
Posts: 7874
Joined: Sun Apr 06, 2003 11:12 pm

Re: button release premature ends key sequence?

Post by phil »

What do you mean "double duty"?

Right now, when you release the button, any actions are flushed (not sent) from the processing queue.
What do you actually want it to do - continue processing the simulated keystroke even after you have released the button?

Thanks,
Phil
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9/G604/M720/MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 11 x64 24H2, AMD Ryzen 9950x3D, MSI x870E Tomahawk, 64GB DDR%,
nVidia RTX 2070s (still lol)
sparkster171
New User
Posts: 3
Joined: Mon Apr 17, 2017 8:03 am

Re: button release premature ends key sequence?

Post by sparkster171 »

Right now, when you release the button, any actions are flushed (not sent) from the processing queue.
under what option in the "how to send the simulated keystrokes" is that? (1-9?). I've tried the ones which are applicable and if I release during the "waitms" section, it still performs the next sequence..
User avatar
phil
Site Admin
Posts: 7874
Joined: Sun Apr 06, 2003 11:12 pm

Re: button release premature ends key sequence?

Post by phil »

What version of XMBC - there was a bug that Ii fixed to flush the queue (without sending the keys) in the current beta run (as in the unreleased 2.16) which is available in the forums (2.16 beta topic).

But that was to do with repeated keystrokes. I'm not 100% sure about the non-repeat methods, they may not flush the queue.

I'm not clear on your problem - is it that the simulated keys continue after the button is released, of that they don't complete when the button is released - or something else?
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9/G604/M720/MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 11 x64 24H2, AMD Ryzen 9950x3D, MSI x870E Tomahawk, 64GB DDR%,
nVidia RTX 2070s (still lol)
sparkster171
New User
Posts: 3
Joined: Mon Apr 17, 2017 8:03 am

Re: button release premature ends key sequence?

Post by sparkster171 »

I'm using the latest stable release v2.15.
is it that the simulated keys continue after the button is released, of that they don't complete when the button is released - or something else?
it continues after the button is released.

my application doesn't apply to the the repeat keystrokes. I've used the repeated option before, it works well and it helps speed things up, however its usually limited to 1 action continually or to a certain extend.

but more useful might be additional keystrokes based on time being held. i.e. on iphone holding certain key allows the option of accents.
Granted on the computer there aren't many shortcut keys which can be used beneficially in sequence, but particularly in my application I do have repetitive actions that I sometimes do immediately following certain actions i.e.:

Action A, B, and C (every line a new execution). Arrows signify pause.

A
A
A --> B
A
A --> B
A --> B --> C
etc

I hope this was clear :cheers:
User avatar
phil
Site Admin
Posts: 7874
Joined: Sun Apr 06, 2003 11:12 pm

Re: button release premature ends key sequence?

Post by phil »

OK, well to prevent the simulated keys continuing after the button is released, please try the latest beta and see if that helps.

As for different things being done depending on how long you hold the button - thats not currently available in XMBC and would be a huge amount of work to do - so it wont be something I'll be adding any time soon (my time is quite limited) but I will add it to the TODO list (if its not already there!).

Thanks,
Phil
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9/G604/M720/MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 11 x64 24H2, AMD Ryzen 9950x3D, MSI x870E Tomahawk, 64GB DDR%,
nVidia RTX 2070s (still lol)
morelaika
New User
Posts: 2
Joined: Wed May 03, 2017 8:35 pm

Re: button release premature ends key sequence?

Post by morelaika »

I have the same issue here. And 2.16beta17 seems dont work.
I want for example in game one tap wait some time and if the button still pressed it will shoot at full auto.
code for example i{WAITMS:1000}iiiiiiiiiiiiiiiiiiii
mode 3(during) it seems is only option here but it behaves as mode 1. Its just run full code no matter how fast i relese mouse button. Tested on notepad. Or I missing something. thanks
update. for surprise mode 6 kind of work as I expect with code like i{WAITMS:250}i{WAITMS:25}i{WAITMS:25}.....
but I dont understend why mode 3 is not
Last edited by morelaika on Wed May 03, 2017 9:03 pm, edited 2 times in total.
User avatar
phil
Site Admin
Posts: 7874
Joined: Sun Apr 06, 2003 11:12 pm

Re: button release premature ends key sequence?

Post by phil »

I don't think your issue is the same at all (but maybe I'm wrong).

Thinking about this a bit, the way method 3 (during) works, is that the keys are ALL pressed (key DOWN message sent) as soon as the button is pressed, and subsequently released (KEY UP sent) released when the button is released.

So method 3 is definitely NOT the right method to be using - putting {WAIT}s in a during does not make any sense.

Quite simply, what you want to do is not possible in XMBC as things stand. What you need, I think is an initial repeat delay of 1000ms and for all other repeats, no delay (or a tiny delay). Method 6 actually does this if you set the auto repeat delay to 0ms BUT the initial delay is not long enough (its about 200ms), much like how a key repeats if you hold it down in notepad (for example). It is probably the closest you will get for now.

To do this properly, I need to add an additional field for the repeat methods (initial delay and repeat delay or something like that).

I will add this to the TODO like but don't expect in in 2.16 as thats too close to final to be making such changes. Maybe 2.17 beta when it drops.
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9/G604/M720/MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 11 x64 24H2, AMD Ryzen 9950x3D, MSI x870E Tomahawk, 64GB DDR%,
nVidia RTX 2070s (still lol)
morelaika
New User
Posts: 2
Joined: Wed May 03, 2017 8:35 pm

Re: button release premature ends key sequence?

Post by morelaika »

Yes. Mode 6 kind of work. Thanks for the participation. I will send a dollar if I dont forget.
User avatar
phil
Site Admin
Posts: 7874
Joined: Sun Apr 06, 2003 11:12 pm

Re: button release premature ends key sequence?

Post by phil »

Actually, if you change the keyboard repeat delay in control panel (keyboard) then restart XMBC then you can increase the initial delay used by method 6... But it affects all keyboard repeat delays...

Until I change XMBC to have two rates like the keyboard control panel, its the best I can offer!
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9/G604/M720/MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 11 x64 24H2, AMD Ryzen 9950x3D, MSI x870E Tomahawk, 64GB DDR%,
nVidia RTX 2070s (still lol)
dyzxyz
New User
Posts: 3
Joined: Fri Feb 28, 2025 7:39 am

Re: button release premature ends key sequence?

Post by dyzxyz »

hello,now my version is v2.20.5,Does this function already exist now?I also need do something when i press a mouse key,and stop it when i release the mouse key,thank u
User avatar
phil
Site Admin
Posts: 7874
Joined: Sun Apr 06, 2003 11:12 pm

Re: button release premature ends key sequence?

Post by phil »

dyzxyz wrote: Fri Feb 28, 2025 8:17 am hello,now my version is v2.20.5,Does this function already exist now?I also need do something when i press a mouse key,and stop it when i release the mouse key,thank u
1. You have replied to a thread from 8 years ago.
2. You clearly have not read the posting rules (or ignored them if you did read them).

Please read the forum rules, then create a new topic, following the forum rules and filling out the post template with clear information on what you are trying to do, otherwise you will be ignored.
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9/G604/M720/MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 11 x64 24H2, AMD Ryzen 9950x3D, MSI x870E Tomahawk, 64GB DDR%,
nVidia RTX 2070s (still lol)
Post Reply