Page 1 of 1

Keyboard locking up after macro ends

Posted: Sat Sep 20, 2003 12:33 pm
by Zeus
Anyone else having a similar problem? Im getting my KB locked up for a good 3-4 seconds after a macro ends (normally or by /end). RL friend had the same problem so was wondering if there was something odd or is it known behavior and anyone has an idea of how to fix it.

Potential Changes to eqlib_main.cpp DInputDataDetour

Posted: Sat Sep 20, 2003 6:05 pm
by onetimehero
This will let one keypress at a time through while running a macro, and as many as can fit if no macro running.

Code: Select all

			if (*pdwInOut >	0) 
			{
				if (gKeyStack) 
				{
[color=red]					do
					{
[/color]						pNext =	gKeyStack->pNext;
						//DebugSpew("Faking	'%s' as	%s...",gDiKeyID[gKeyStack->KeyId].szName,(gKeyStack->Pressed)?"down":"up");
						rgdod[didAdd].dwOfs	= gDiKeyID[gKeyStack->KeyId].Id;
						rgdod[didAdd].dwData = (gKeyStack->Pressed)?0x80:0;
						rgdod[didAdd].dwSequence = dwSequence;
						rgdod[didAdd].dwTimeStamp =	dwTimeStamp;
						rgdod[didAdd].uAppData = 0;
						(*pdwInOut)--;
						free(gKeyStack);
						gKeyStack =	pNext;
						didAdd++;
[color=red]					}while ( !gMacroBlock && gKeyStack &&	(*pdwInOut)	!= 0);
[/color]					(*pdwInOut)	= didAdd;
					gbInDInput = FALSE;
					return (HRESULT)DI_OK;
It works, really. Try it.

Posted: Sun Sep 21, 2003 4:20 pm
by mamba666
I had that delay problem after macro. It does seem to que up the kepresses tho so they do go through after the pause. A little annoying however.

Posted: Mon Sep 22, 2003 3:35 am
by dont_know_at_all
Hmm. I am seeing the keyboard lockups but I thought I was losing keyboard focus somehow because after a few seconds of hammering the keyboard, I would finally click and it would start working.

However, I only see the lockup on macros that use /click. I see this with eqw and I haven't tested without eqw.

Posted: Mon Sep 22, 2003 9:43 am
by Mckorr
It doesn't really lock up. There is a pause of a few seconds after a macro ends. Keystrokes are buffered during that time, and show up after the delay. Sure, it's mildly annoying, but liveable.

Posted: Mon Sep 22, 2003 3:13 pm
by Zeus
Ok so I didn't break anything on my own :) Btw I don't use click and I play on eqw. That happened on melee macros.

Posted: Mon Sep 22, 2003 5:32 pm
by Mckorr
It's not exactly related to click, it's related to detouring the DInput functions. I bet your melee macro uses some form of /press or /sendkey, doesn't it?

Click and key presses are both detoured DInput functions.

Posted: Tue Sep 23, 2003 8:08 am
by || Napolion ||
The keyboard still pause for like 3 sec even with no click/keypress macros. I have been using this macro http://macroquest2.com/phpBB2/viewtopic.php?t=2906 and when the macro endes it stil hold all keyboard function for like 3 sec.

|| Napolion ||

/endmacro keep keys

Posted: Tue Sep 23, 2003 11:37 am
by Xfactor

Posted: Wed Sep 24, 2003 6:54 pm
by || Napolion ||
Yes it keep the keys I have pressed when the macro are closing.

It still hold a 2 to 5 sec break before it presses the keys, and that are not good when I am running and have to make a turn just after I have used a macro :(

Posted: Thu Sep 25, 2003 4:26 pm
by Shocks
I have noticed the same thing but as it was stated its livable. My question is more xp and macroquest question. When I am in xp I am unable to alt tab between programs.

Posted: Thu Sep 25, 2003 10:06 pm
by insanitywiz

Thanks

Posted: Sun Sep 28, 2003 1:36 pm
by Shocks
Thanks alot :)

Posted: Tue Oct 07, 2003 5:49 pm
by Jabber
This being looked into still? I see the same issue on the revamped code still. Its slightly annoying at times is all.

Posted: Tue Oct 07, 2003 6:04 pm
by dont_know_at_all
/endm keep keys

If you turn on debugspew, you can see that there are a ton of keypresses which get queued up at the end of a macro to "undo" anything you've done. Just use the above line to end your macros and you are golden.