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

The Mouse#controlLeftTicks field is incremented by mouse actions rather than ticks #3782

Closed
haykam821 opened this issue Feb 6, 2024 · 0 comments · Fixed by #3878
Closed
Labels
bug Fixes or discusses a bug within the mappings

Comments

@haykam821
Copy link
Contributor

haykam821 commented Feb 6, 2024

The relevant code is a mouse button callback in the Mouse class, rather than a tick method:

private void onMouseButton(long window, int button, int action, int mods) {
	// ...

	boolean press = action == GLFW.GLFW_PRESS;

	if (MinecraftClient.IS_SYSTEM_MAC && button == GLFW.GLFW_MOUSE_BUTTON_1) {
		if (press) {
			if ((mods & GLFW.GLFW_MOD_CONTROL) == GLFW.GLFW_MOD_CONTROL) {
				button = GLFW.GLFW_MOUSE_BUTTON_2;
				++this.controlLeftTicks;
			}
		} else if (this.controlLeftTicks > 0) {
			button = GLFW.GLFW_MOUSE_BUTTON_2;
			--this.controlLeftTicks;
		}
	}

	// ...
}
@haykam821 haykam821 added the bug Fixes or discusses a bug within the mappings label Feb 6, 2024
@apple502j apple502j mentioned this issue May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes or discusses a bug within the mappings
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant