ActuallyAdditions/src/main/java/de/ellpeck/actuallyadditions/mod/util/KeyUtil.java

29 lines
888 B
Java
Raw Normal View History

2015-08-29 14:33:25 +02:00
/*
* 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
2016-01-03 16:05:51 +01:00
* http://ellpeck.de/actaddlicense/
2015-08-29 14:33:25 +02:00
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
2016-01-03 16:05:51 +01:00
* © 2016 Ellpeck
2015-08-29 14:33:25 +02:00
*/
2016-01-05 04:47:35 +01:00
package de.ellpeck.actuallyadditions.mod.util;
2015-03-29 15:29:05 +02:00
import org.lwjgl.input.Keyboard;
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);
}
2015-08-31 06:15:06 +02:00
public static boolean isAltPressed(){
return Keyboard.isKeyDown(Keyboard.KEY_LMENU) || Keyboard.isKeyDown(Keyboard.KEY_RMENU);
}
2015-03-29 15:29:05 +02:00
}