mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-09-28 20:01:05 +02:00
5e0e79d691
Nothing special. Well, lots of special stuff actually.
31 lines
1,009 B
Java
31 lines
1,009 B
Java
/*
|
|
* This file ("KeyUtil.java") is part of the Actually Additions Mod for Minecraft.
|
|
* It is created and owned by Ellpeck and distributed
|
|
* under the Actually Additions License to be found at
|
|
* http://ellpeck.de/actaddlicense/
|
|
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
|
*
|
|
* © 2016 Ellpeck
|
|
*/
|
|
|
|
package de.ellpeck.actuallyadditions.mod.util;
|
|
|
|
import net.minecraftforge.fml.relauncher.Side;
|
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
|
import org.lwjgl.input.Keyboard;
|
|
|
|
@SideOnly(Side.CLIENT)
|
|
public class KeyUtil{
|
|
|
|
public static boolean isShiftPressed(){
|
|
return Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT);
|
|
}
|
|
|
|
public static boolean isControlPressed(){
|
|
return Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) || Keyboard.isKeyDown(Keyboard.KEY_RCONTROL);
|
|
}
|
|
|
|
public static boolean isAltPressed(){
|
|
return Keyboard.isKeyDown(Keyboard.KEY_LMENU) || Keyboard.isKeyDown(Keyboard.KEY_RMENU);
|
|
}
|
|
}
|