FAQ  •  Register  •  Login

Keypress Detection when Mapped Key is Turned Off

Moderator: MiRai

<<

firescue17

User avatar

League of Extraordinary Multiboxers

Posts: 585

Joined: Wed Sep 19, 2012 7:37 am

Location: Omaha, NE

Post Wed Jun 12, 2013 1:12 am

Keypress Detection when Mapped Key is Turned Off

I've encountered an interesting scenario I thought I would point out for discussion. With that said, holy crap was this tough to track down :)

Mapped Keys can be set up to run off a single Keypress with:

Keypress Down: Mapped Key Step 1
Keypress Up: Mapped Key Step 2

I believe the User would always want the step assigned to the Keypress Down to execute first. That's the point of setting up a Mapped Key in this manner.

The scenario in question occurs if the Mapped Key is turned off when the Keypress occurs. Obviously the Step is not executed because the Mapped Key is turned off, but the key *IS* still physically pressed down. Subsequently, the Mapped Key turns back on. At which point, when the key is released the generic "on press or release" goes into effect, and activates Step 2. Step 1 is bypassed. Unfortunately, this throws the Mapped Key Steps out of order and the Mapped Key proceeds to execute backwards:

Keypress Down: Mapped Key Step 2
Keypress Up: Mapped Key Step 1

Now, my initial reaction was if the Mapped Key is turned off, it should block the Keypress entirely. With that said, I don't have enough insight to know what impact this change may have or if it's even possible. Specifically regarding Mapped Keys with odd numbers of steps where "Do Not Advanced" is used to keep the Mapped Key from wrapping around prematurely:

Keypress Down: Step 1
Keypress Up: Step 2
Keypress Down (Do Not Advance for X Seconds): Step 3
Keypress Up: No Step as it's blocked by the previous "Do Not Advance."

I can provide a case study if needed. I didn't want to confuse the issue by trying to sort out a particular chain of Mapped Keys.
<<

Alge

User avatar

League of Extraordinary Multiboxers

Posts: 1223

Joined: Wed Jan 26, 2011 2:17 am

Location: Under the milky way tonight

Post Wed Jun 12, 2013 5:27 am

Re: Keypress Detection when Mapped Key is Turned Off

Not sure if this is a bug or feature. I do have some other suggestions for how to avoid this issue.

Either when the Mapped Key is turned off or when it is being turned on again, use a Mapped Key Step Action to set the Step to the appropriate number, i.e. whichever step you want to occur the next time the Mapped Key is activated.

There is also an option on the Advanced page for every Mapped Key: Reset to Step 1 after xx seconds from the first/last Hotkey press. Though I am not sure how that will interact with the Mapped Key being turned off.
<<

lax

User avatar

Site Admin

Posts: 7303

Joined: Tue Nov 17, 2009 9:32 pm

Post Wed Jun 12, 2013 8:00 am

Re: Keypress Detection when Mapped Key is Turned Off

I believe the User would always want the step assigned to the Keypress Down to execute first. That's the point of setting up a Mapped Key in this manner.

That's a pretty bold general statement, and I have to disagree. There are many uses for the way various features interact... You could, however, argue that there could be a check box or something pegging it to do Step 1 on press and Step 2 on release for you,

Obviously the Step is not executed because the Mapped Key is turned off, but the key *IS* still physically pressed down. Subsequently, the Mapped Key turns back on

I'm with Alge, you should probably be using a Mapped Key Step Action and set it to Step 2, if you're enabling this Mapped Key on Press with the same Hotkey it itself is assigned to and expect it to be synchronized with Step 1 = press and Step 2 = release.

The Reset to Step 1 is extremely useful on a Mapped Key that the user expects to be Step 1 on key press and 2 on release. It won't affect the initial press/release, because when you enable the Mapped Key it will already be reset to Step 1. But, if you're leaving it on after that, it will help make sure that it stays synced the way you want it.

Return to General

Who is online

Users browsing this forum: No registered users and 1 guest