Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input.is_mouse_button_pressed(MOUSE_BUTTON_WHEEL_LEFT/RIGHT) is always returning false #91025

Open
SpyrexDE opened this issue Apr 22, 2024 · 2 comments

Comments

@SpyrexDE
Copy link

Tested versions

  • Reproducable in v4.2.2.stable.official [15073af]

System information

Godot v4.2.2.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 2080 Ti (NVIDIA; 31.0.15.3623) - AMD Ryzen 9 3900X 12-Core Processor (24 Threads)

Issue description

The function is_mouse_button_pressed() works with mouse indices like 1 for left mouse button, it does not for 6 or 7 which are wheel left and right:

Input.is_mouse_button_pressed(MOUSE_BUTTON_LEFT) # Returns true if pressed, false if not
Input.is_mouse_button_pressed(MOUSE_BUTTON_WHEEL_LEFT) # Always returns false

Steps to reproduce

func _process(delta):
    print(Input.is_mouse_button_pressed(MOUSE_BUTTON_WHEEL_LEFT))

Run and press your mouse wheel to the left.

Minimal reproduction project (MRP)

BugReport.zip

@AThousandShips
Copy link
Member

The mouse wheel events are sent in a single frame, the down and up events are sent at once, by design, this should probably be documented better though

@SpyrexDE
Copy link
Author

the down and up events are sent at once, by design

That makes sense for down and up scrolling but it feels like the left/right wheel buttons are handled the same way, which should not be the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants