Keyboard locking up after macro ends

A forum for the general posts relating to MacroQuest. *DEPRECATED: This forum is no longer in public use, but remains here for your reading pleasure. Enjoy

Moderator: MacroQuest Developers

Zeus
a hill giant
a hill giant
Posts: 180
Joined: Wed Feb 19, 2003 10:03 am
Contact:

Keyboard locking up after macro ends

Post by Zeus » Sat Sep 20, 2003 12:33 pm

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.

onetimehero
a ghoul
a ghoul
Posts: 105
Joined: Fri Sep 05, 2003 2:42 pm

Potential Changes to eqlib_main.cpp DInputDataDetour

Post by onetimehero » Sat Sep 20, 2003 6:05 pm

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.
Last edited by onetimehero on Tue Oct 07, 2003 7:10 pm, edited 1 time in total.
Hmm. That's odd.

mamba666
a lesser mummy
a lesser mummy
Posts: 49
Joined: Fri Aug 15, 2003 11:47 am

Post by mamba666 » Sun Sep 21, 2003 4:20 pm

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.

User avatar
dont_know_at_all
Developer
Developer
Posts: 5450
Joined: Sun Dec 01, 2002 4:15 am
Location: Florida, USA
Contact:

Post by dont_know_at_all » Mon Sep 22, 2003 3:35 am

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.

Mckorr
Developer
Developer
Posts: 2326
Joined: Fri Oct 18, 2002 1:16 pm
Location: Texas

Post by Mckorr » Mon Sep 22, 2003 9:43 am

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.
MQ2: Think of it as Evolution in action.

Zeus
a hill giant
a hill giant
Posts: 180
Joined: Wed Feb 19, 2003 10:03 am
Contact:

Post by Zeus » Mon Sep 22, 2003 3:13 pm

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.

Mckorr
Developer
Developer
Posts: 2326
Joined: Fri Oct 18, 2002 1:16 pm
Location: Texas

Post by Mckorr » Mon Sep 22, 2003 5:32 pm

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.
MQ2: Think of it as Evolution in action.

|| Napolion ||
a ghoul
a ghoul
Posts: 96
Joined: Sat Dec 28, 2002 7:45 am

Post by || Napolion || » Tue Sep 23, 2003 8:08 am

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 ||

Xfactor
orc pawn
orc pawn
Posts: 15
Joined: Tue Sep 23, 2003 11:34 am

/endmacro keep keys

Post by Xfactor » Tue Sep 23, 2003 11:37 am


|| Napolion ||
a ghoul
a ghoul
Posts: 96
Joined: Sat Dec 28, 2002 7:45 am

Post by || Napolion || » Wed Sep 24, 2003 6:54 pm

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 :(

Shocks
a ghoul
a ghoul
Posts: 101
Joined: Tue Feb 18, 2003 3:26 pm
Contact:

Post by Shocks » Thu Sep 25, 2003 4:26 pm

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.

insanitywiz
a hill giant
a hill giant
Posts: 250
Joined: Mon Jul 08, 2002 7:50 am

Post by insanitywiz » Thu Sep 25, 2003 10:06 pm


Shocks
a ghoul
a ghoul
Posts: 101
Joined: Tue Feb 18, 2003 3:26 pm
Contact:

Thanks

Post by Shocks » Sun Sep 28, 2003 1:36 pm

Thanks alot :)

Jabber
a lesser mummy
a lesser mummy
Posts: 32
Joined: Sat Aug 23, 2003 2:45 pm

Post by Jabber » Tue Oct 07, 2003 5:49 pm

This being looked into still? I see the same issue on the revamped code still. Its slightly annoying at times is all.

User avatar
dont_know_at_all
Developer
Developer
Posts: 5450
Joined: Sun Dec 01, 2002 4:15 am
Location: Florida, USA
Contact:

Post by dont_know_at_all » Tue Oct 07, 2003 6:04 pm

/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.