-
Notifications
You must be signed in to change notification settings - Fork 39
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
Can't scroll while holding SHIFT on macOS #90
Comments
Confirmed that the shift key issue occurs on 2.4.1 |
I suspect the issue is here: lwjgl3ify/src/main/java/org/lwjglx/opengl/Display.java Lines 263 to 272 in f5906d0
Holding SHIFT while scrolling on macOS usually enables "horizontal scrolling", which I assume would mean here that the Minecraft itself had this issue until 1.20.2; I wonder what their fix was? |
net.minecraft.client.MouseHandler(Yarn mappings) private void onScroll(long l, double d, double e) {
if (l == Minecraft.getInstance().getWindow().getWindow()) {
boolean bl = this.minecraft.options.discreteMouseScroll().get();
double f = this.minecraft.options.mouseWheelSensitivity().get();
double g = (bl ? Math.signum(d) : d) * f;
double h = (bl ? Math.signum(e) : e) * f;
if (this.minecraft.getOverlay() == null) {
if (this.minecraft.screen != null) {
double i = this.xpos * (double)this.minecraft.getWindow().getGuiScaledWidth() / (double)this.minecraft.getWindow().getScreenWidth();
double j = this.ypos * (double)this.minecraft.getWindow().getGuiScaledHeight() / (double)this.minecraft.getWindow().getScreenHeight();
this.minecraft.screen.mouseScrolled(i, j, g, h);
this.minecraft.screen.afterMouseAction();
} else if (this.minecraft.player != null) {
if (this.accumulatedScrollX != 0.0 && Math.signum(g) != Math.signum(this.accumulatedScrollX)) {
this.accumulatedScrollX = 0.0;
}
if (this.accumulatedScrollY != 0.0 && Math.signum(h) != Math.signum(this.accumulatedScrollY)) {
this.accumulatedScrollY = 0.0;
}
this.accumulatedScrollX += g;
this.accumulatedScrollY += h;
int k = (int)this.accumulatedScrollX;
int m = (int)this.accumulatedScrollY;
if (k == 0 && m == 0) {
return;
}
this.accumulatedScrollX -= (double)k;
this.accumulatedScrollY -= (double)m;
int n = m == 0 ? -k : m;
if (this.minecraft.player.isSpectator()) {
if (this.minecraft.gui.getSpectatorGui().isMenuActive()) {
this.minecraft.gui.getSpectatorGui().onMouseScrolled(-n);
} else {
float o = Mth.clamp(this.minecraft.player.getAbilities().getFlyingSpeed() + (float)m * 0.005F, 0.0F, 0.2F);
this.minecraft.player.getAbilities().setFlyingSpeed(o);
}
} else {
this.minecraft.player.getInventory().swapPaint((double)n);
}
}
}
}
} I guess that would translate to simply Note that this would reverse hotbar scrolling while holding SHIFT (instead of breaking it completely), which is what vanilla Minecraft 1.20.2 does as well. |
On macOS, while holding the SHIFT key, scrolling using the mouse wheel does not work anywhere in-game. This is most notable when attempting to scroll through hotbar slots.
This does not affect 1.7.10 without LWJGL3ify.
See MC-121772.
(as a side note, lwjgl3ify is surprisingly not affected by MC-59810)
Versions:
1.7.10
10.13.4.1614
3.3.2
1.5.2
The text was updated successfully, but these errors were encountered: