Java Code Examples for org.lwjgl.glfw.GLFW#GLFW_KEY_KP_ENTER

The following examples show how to use org.lwjgl.glfw.GLFW#GLFW_KEY_KP_ENTER . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: WWidget.java    From LibGui with MIT License 2 votes vote down vote up
/**
 * Tests if the provided key code is an activation key for widgets.
 *
 * <p>The activation keys are Enter, keypad Enter, and Space.
 *
 * @param ch the key code
 * @return whether the key is an activation key
 * @since 2.0.0
 */
@Environment(EnvType.CLIENT)
public static boolean isActivationKey(int ch) {
	return ch == GLFW.GLFW_KEY_ENTER || ch == GLFW.GLFW_KEY_KP_ENTER || ch == GLFW.GLFW_KEY_SPACE;
}