Page MenuHomeFeedback Tracker

inputAction doesn't detect RMB click
Feedback, WishlistPublic

Description

The inputAction command doesn't detect the secondary mouse button. My joystick also has a secondary mouse button which isn't detected by the command. However, they do detect a RMB hold.

Details

Legacy ID
2597464152
Severity
None
Resolution
Open
Reproducibility
Always
Operating System
Windows 7
Category
Scripting
Steps To Reproduce
  1. Bind right mouse to "Use Action 1" in "Custom controls", or test the following:

(input actions bound to RMB click: "optics", "opticsTemp", "menuBack")

  1. Run code in console:

hint "";

  • spawn {waitUntil {inputAction "user1" != 0}; hint "detected"}
  1. press the button ingame
Additional Information

Event Timeline

Waffle_SS edited Steps To Reproduce. (Show Details)Aug 1 2015, 9:18 AM
Waffle_SS edited Additional Information. (Show Details)
Waffle_SS set Category to Scripting.
Waffle_SS set Reproducibility to Always.
Waffle_SS set Severity to None.
Waffle_SS set Resolution to Open.
Waffle_SS set Legacy ID to 2597464152.May 8 2016, 12:28 PM

The RMB mouse button works with inputAction just fine:

oneachframe {hintsilent str [inputAction "holdbreath"]}

However if bound to user action, inputAction fails to detect mouse button input:

  1. bind sec mouse button to User Action 1
  2. execute

oneachframe {hintsilent str [inputAction "user1"]}

  1. no effect

Edited the title

"holdbreath" is detected for me, but only because its bound to RMB hold. Even when using your code, binding RMB click to holdBreath, or any other action is still undetected.

That's true, I just tested. So the issue is with mouse button hold.

  1. open User Action 1 bindings
  2. press and hold RMB to add mouse button binding
  3. execute

oneachframe {hintsilent str [inputAction "user1"]}

  1. it Works

do the same as above but add normal button press instead of hold
it doesnt work.

Not sure if this is related, but I've noticed when binding RMB to a control it detects it as Hold Sec. Mouse Button for a half-second then switching to normal Sec. Mouse Button. Issue does not occur when binding Sec. Mouse button with a modifier (Ctrl, Shift, Alt).

Tested on stable branch with two different mice and no addons.

I've also noticed this behavior, Tholozor.

running the following code
`

		systemChat str (inputAction 'optics');
		systemChat str (inputAction 'opticsTemp');
		systemChat str (inputAction 'opticsMode');

`
will always print 0 for all 3, when the bind is RMB (right mouse button).
However, when binding to keyboard, like "H", inputAction works and prints 1

dedmen added a subscriber: dedmen.Jun 15 2021, 11:04 AM

Looks very much like a "won't fix"
always handling mouse clicks as mouse hold's was done intentionally because that makes more sense to the average player

BIS_fnc_KK edited Steps To Reproduce. (Show Details)
BIS_fnc_KK edited Additional Information. (Show Details)
BIS_fnc_KK set Operating System to Windows 7.
BIS_fnc_KK removed BIS_fnc_KK as the assignee of this task.Nov 21 2021, 1:14 PM
BIS_fnc_KK changed the task status from New to Feedback.
BIS_fnc_KK added a subscriber: BIS_fnc_KK.