Skip to content

Commit

Permalink
allow ctrl key for macos instead of super
Browse files Browse the repository at this point in the history
  • Loading branch information
Wyvest committed Mar 11, 2024
1 parent f2e232f commit d62d36f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/org/polyfrost/chatting/mixin/GuiChatMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import net.minecraft.client.renderer.GlStateManager;
import net.minecraftforge.fml.client.config.GuiUtils;
import org.apache.commons.lang3.StringUtils;
import org.lwjgl.input.Keyboard;
import org.lwjgl.input.Mouse;
import org.polyfrost.chatting.chat.*;
import org.polyfrost.chatting.config.ChattingConfig;
Expand Down Expand Up @@ -83,7 +84,7 @@ private void keyTyped(char typedChar, int keyCode, CallbackInfo ci) {
}
searchButton.getInputField().textboxKeyTyped(typedChar, keyCode);
ChatSearchingManager.INSTANCE.setLastSearch(searchButton.getInputField().getText());
} else if (isCtrlKeyDown() && keyCode == UKeyboard.KEY_TAB) {
} else if ((Keyboard.isKeyDown(219) || Keyboard.isKeyDown(220) || Keyboard.isKeyDown(29) || Keyboard.isKeyDown(157)) && keyCode == UKeyboard.KEY_TAB) { // either macos super key or ctrl key for any os
ci.cancel();
ChatHooks.INSTANCE.switchTab();
}
Expand Down

0 comments on commit d62d36f

Please sign in to comment.