Java Code Examples for org.lwjgl.input.Keyboard#KEY_INSERT

The following examples show how to use org.lwjgl.input.Keyboard#KEY_INSERT . 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: KeepContainer.java    From LiquidBounce with GNU General Public License v3.0 5 votes vote down vote up
@EventTarget
public void onKey(final KeyEvent event) {
    if(event.getKey() == Keyboard.KEY_INSERT) {
        if(container == null)
            return;

        mc.displayGuiScreen(container);
    }
}
 
Example 2
Source File: GameCamera.java    From tribaltrouble with GNU General Public License v2.0 4 votes vote down vote up
public final void keyPressed(KeyboardEvent event) {
	switch (event.getKeyCode()) {
		case Keyboard.KEY_HOME:
		case Keyboard.KEY_NUMPAD8:
			break;
		case Keyboard.KEY_END:
		case Keyboard.KEY_NUMPAD2:
			break;
		case Keyboard.KEY_INSERT:
		case Keyboard.KEY_NUMPAD6:
			viewer.getPicker().pickRotate(this);
			break;
		case Keyboard.KEY_DELETE:
		case Keyboard.KEY_NUMPAD4:
			viewer.getPicker().pickRotate(this);
			break;
		case Keyboard.KEY_PRIOR:
		case Keyboard.KEY_NUMPAD9:
			mouseScrolled(-2);
			break;
		case Keyboard.KEY_NEXT:
		case Keyboard.KEY_NUMPAD3:
			mouseScrolled(2);
			break;
		case Keyboard.KEY_UP:
			if (!scrollSpeedLocked(Keyboard.KEY_UP)) {
				scroll_acceleration_seconds = 0;
				setScrollSpeed();
			}
			break;
		case Keyboard.KEY_DOWN:
			if (!scrollSpeedLocked(Keyboard.KEY_DOWN)) {
				scroll_acceleration_seconds = 0;
				setScrollSpeed();
			}
			break;
		case Keyboard.KEY_LEFT:
			if (!scrollSpeedLocked(Keyboard.KEY_LEFT)) {
				scroll_acceleration_seconds = 0;
				setScrollSpeed();
			}
			break;
		case Keyboard.KEY_RIGHT:
			if (!scrollSpeedLocked(Keyboard.KEY_RIGHT)) {
				scroll_acceleration_seconds = 0;
				setScrollSpeed();
			}
			break;
	}
}