Package net.minecraft.client.util
Class InputUtil
java.lang.Object
net.minecraft.client.util.InputUtil
@Environment(CLIENT) public class InputUtil extends Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
InputUtil.Key
static class
InputUtil.Type
-
Field Summary
Fields Modifier and Type Field Description private static int
GLFW_RAW_MOUSE_MOTION
private static MethodHandle
GLFW_RAW_MOUSE_MOTION_SUPPORTED_HANDLE
static InputUtil.Key
UNKNOWN_KEY
-
Constructor Summary
Constructors Constructor Description InputUtil()
-
Method Summary
Modifier and Type Method Description static InputUtil.Key
fromKeyCode(int keyCode, int scanCode)
static InputUtil.Key
fromTranslationKey(String translationKey)
static boolean
isKeyPressed(long handle, int code)
static boolean
isRawMouseMotionSupported()
static void
setCursorParameters(long handler, int int2, double double2, double double3)
static void
setKeyboardCallbacks(long handle, GLFWKeyCallbackI keyCallback, GLFWCharModsCallbackI charModsCallback)
static void
setMouseCallbacks(long handle, GLFWCursorPosCallbackI cursorPosCallback, GLFWMouseButtonCallbackI mouseButtonCallback, GLFWScrollCallbackI scrollCallback, GLFWDropCallbackI gLFWDropCallbackI)
static void
setRawMouseMotionMode(long window, boolean value)
-
Field Details
-
GLFW_RAW_MOUSE_MOTION_SUPPORTED_HANDLE
-
GLFW_RAW_MOUSE_MOTION
private static final int GLFW_RAW_MOUSE_MOTION -
UNKNOWN_KEY
-
-
Constructor Details
-
InputUtil
public InputUtil()
-
-
Method Details
-
fromKeyCode
-
fromTranslationKey
-
isKeyPressed
public static boolean isKeyPressed(long handle, int code) -
setKeyboardCallbacks
public static void setKeyboardCallbacks(long handle, GLFWKeyCallbackI keyCallback, GLFWCharModsCallbackI charModsCallback) -
setMouseCallbacks
public static void setMouseCallbacks(long handle, GLFWCursorPosCallbackI cursorPosCallback, GLFWMouseButtonCallbackI mouseButtonCallback, GLFWScrollCallbackI scrollCallback, GLFWDropCallbackI gLFWDropCallbackI) -
setCursorParameters
public static void setCursorParameters(long handler, int int2, double double2, double double3) -
isRawMouseMotionSupported
public static boolean isRawMouseMotionSupported() -
setRawMouseMotionMode
public static void setRawMouseMotionMode(long window, boolean value)
-