ID:1396067
 
Resolved
Key-up macros belonging to the default window would fire when a child window had focus, even if no corresponding key-down had fired for the default window.
BYOND Version:500
Operating System:Windows 7 Ultimate 64-bit
Web Browser:Firefox 24.0
Applies to:Dream Seeker
Status: Resolved (501.1214)

This issue has been resolved.
Descriptive Problem Summary:

If the primary window has a macro set attached, but a child window does not, key-up macros will still be called while the child window has focus, but key-down macros will not.

Numbered Steps to Reproduce Problem:

1) Create a new window
2) Do not select a macro for the new window
3) Set up a key-up macro in the primary macro set.
4) Run, and click on the child window.
5) Hit the key bound to key+up macro you created.
6) Watch it run.

Code Snippet (if applicable) to Reproduce Problem:

test project: http://files.byondhome.com/Ter13/testbed_src.zip

Press spacebar to call a verb that will tell you when spacebar is being pressed, and release it to call a verb that tells you when spacebar is being released.

Click on the output panel, and hit spacebar a bunch of times.

Expected Results:

Key-up should not be recognized

Actual Results:

Key-up runs

Workarounds:

Set the child window's macro to a new, blank macro set.
Lummox JR resolved issue with message:
Key-up macros belonging to the default window would fire when a child window had focus, even if no corresponding key-down had fired for the default window.
As always Lummox, thanks for what you do.

I'll just be over here doing things you probably didn't think anybody would actually be stupid enough to do...
I was glad it turned out to be an easy fix. Often macro issues have been nightmarish, but in this case it turned out that the reason for the bug was that the lookup for which window had the keydown event to match had an empty string. Looking up a window by empty string in DS brings up the default window; hence the bug. I added a check to ensure the key-up window matching only happens when there's a non-empty string present.