All Downloads are FREE. Search and download functionalities are using the official Maven repository.

lejos.hardware.Key Maven / Gradle / Ivy

Go to download

leJOS (pronounced like the Spanish word "lejos" for "far") is a tiny Java Virtual Machine. In 2013 it was ported to the LEGO EV3 brick.

The newest version!
package lejos.hardware;

public interface Key {
	
	public static final int UP = 0;
	public static final int ENTER = 1;
	public static final int DOWN = 2;
	public static final int RIGHT = 3;
	public static final int LEFT = 4;
	public static final int ESCAPE = 5;
	
	public static int KEY_RELEASED = 0;
	public static int KEY_PRESSED = 1;
	public static int KEY_PRESSED_AND_RELEASED = 2;
	
	public int getId();
	
	public boolean isDown();
	
	public boolean isUp();
	
	public void waitForPress();
	
	public void waitForPressAndRelease();
	
	public void addKeyListener (KeyListener listener);
	
	public void simulateEvent(int event);
	
	public String getName();

};




© 2015 - 2024 Weber Informatics LLC | Privacy Policy