ID:106644
 
Resolved
Clicking an input control while holding a macro key down would fail to fire the corresponding UP macro in some cases.
BYOND Version:479
Operating System:Windows XP Home
Web Browser:Safari 5.0.3
Applies to:Dream Seeker
Status: Resolved (480)

This issue has been resolved.
Descriptive Problem Summary:

When you hold down a macro and then click an input control, focus switches to the input and the macro never releases.

Numbered Steps to Reproduce Problem:

http://files.byondhome.com/Kalzar/Macro%20Bug_src.zip

1) Hold A
2) Release A
3) Hold A
4) Press the input
5) Release A

Expected Results:
"Button Pressed". "Button Held", "Button Held", "Button Released"

Actual Results:
"Button Pressed". "Button Held", "Button Held"

Does the problem occur:
Every time? Or how often? Every time I've tested
In other games? I've only tested in my game
In other user accounts? N/A
On other computers? N/A

When does the problem NOT occur?
If I don't press the input control

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)

http://www.byond.com/members/ DreamMakers?command=view_tracker_issue&tracker_issue=1154

SuperAntX wrote a similar bug report, but Lummox mentioned it was fixed in an earlier build.

Workarounds:

Don't click the input? I guess I could make some while loop to make sure focus on the map is true and then call the release proc when it does, but I think that defeats the purpose of the release macro.
I know you guys are busy, but just a simple remark to know that my tracker was read would really go a long way.
The bug is still there. Anyone who plays Decadence regularly knows there's something wrong with key+up macros.
Selecting an input control seems to trigger the key up when the key is released. Using an input() seems to trigger the key up immediately. From what I've seen of Decadence, the problem from key up macros is an error on your part. I use key up macros in several of my projects, on most primary systems, without any problems.
In Kalzar's demo switching focus fails to call key+up commands. The key no longer repeats, but key+up is never actually called. Using input() does trigger all key+up commands, but input lines in the interface are a different beast.

As for Decadence, the movement may seem complicated but most of the operations have little to do with the actual key inputs. At the top level it's just a series of key+up key+down commands. The fact that only key+up commands are effected provides us with a clue as to what's going on.

In most commercial games keys are constantly checked to see if they're still being pressed. BYOND on the other hand seems to just wait for key+down or key+up commands. Since a lot of keyboards suffer from keyjamming, certain key combinations fail to trigger key+up.
Seems to fail with letters, though arrow keys work. Guess there is a bug somewhere.
Seems irrelevant to Decadence though, unless the game secretly focuses me on inputs.
Decadence seems to suffer from keyjamming during normal play without interface windows. That bug is related to key+up commands but unrelated to this bug or my referenced bug report.

What is related is the bug report Kalzar has submitted. Pressing F3 in Decadence switches to an alternate interface which has standard output windows and an input bar. Focusing on the input bar while moving will not call key+up commands, causing characters to walk endlessly.
Right. I knew it was related to key+up and thats all I searched for in the bug tickets. I included it because maybe behind the scene they are connected somehow.