Page MenuHomeFeedback Tracker

InputAction: Inconsistent result with UserXX binds (dependent on other bindings).
New, WishlistPublic

Description

InputAction applied in a display event handler to a user binding (User1-User20) only returns non-zero immediately if the key is pressed *and* it happens to bound to some other action. If the key is not used in some other binding then InputAction will not return true until the key starts repeating.

It's a small thing and something of an edge case but these are exactly the type of 'unknowable' issues that drive users and addon makers crazy. {F25136}

Details

Legacy ID
3766959614
Severity
None
Resolution
Open
Reproducibility
Always
Category
Scripting
Steps To Reproduce

Bind two keys which are already bound to some other action to the custom action [User10]. Here I will use 'K' (default binding [Compass]) and 'L' (default binding [Headlights]).

Run the attached mission, each time either key is pressed and immediately released two lines will be printed to chat;

<Time> User10 key pressed...
...and flagged by InputAction.

Now unbind 'L' from [HeadLights] after which pressing it will only yield;

<Time> User10 key pressed...

...unless it is held down and begins repeating. The 'K' key which is still also bound to [Compass] behaves as before.

A test for a single keystroke should not return different results just because the key doesn't happen to also be bound to some other action.

Event Timeline

Defunkt edited Steps To Reproduce. (Show Details)Nov 13 2014, 8:36 PM
Defunkt edited Additional Information. (Show Details)
Defunkt set Category to Scripting.
Defunkt set Reproducibility to Always.
Defunkt set Severity to None.
Defunkt set Resolution to Open.
Defunkt set Legacy ID to 3766959614.May 7 2016, 7:49 PM