APIdia Launch Partner
Top Fields Constructors Methods
com.badlogic.gdx

public abstract Class AbstractInput

extends Object
implements Input
Class Inheritance
All Implemented Interfaces
com.badlogic.gdx.Input
Imports
com.badlogic.gdx.utils.IntSet

Field Summary

Modifier and TypeField and Description
protected final boolean[]
protected boolean
private final IntSet
protected int
protected final boolean[]

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
public boolean
isKeyJustPressed(int key)

Implements com.badlogic.gdx.Input.isKeyJustPressed.

Returns whether the key has just been pressed.

public boolean
isKeyPressed(int key)

Implements com.badlogic.gdx.Input.isKeyPressed.

Returns whether the key is pressed.

public void
setCatchKey(int keycode, boolean catchKey)

Implements com.badlogic.gdx.Input.setCatchKey.

Sets whether the given key on Android or GWT should be caught.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

justPressedKeysback to summary
protected final boolean[] justPressedKeys
keyJustPressedback to summary
protected boolean keyJustPressed
keysToCatchback to summary
private final IntSet keysToCatch
pressedKeyCountback to summary
protected int pressedKeyCount
pressedKeysback to summary
protected final boolean[] pressedKeys

Constructor Detail

AbstractInputback to summary
public AbstractInput()

Method Detail

isCatchKeyback to summary
public boolean isCatchKey(int keycode)

Implements com.badlogic.gdx.Input.isCatchKey.

Annotations
@Override
isKeyJustPressedback to summary
public boolean isKeyJustPressed(int key)

Implements com.badlogic.gdx.Input.isKeyJustPressed.

Doc from com.badlogic.gdx.Input.isKeyJustPressed.

Returns whether the key has just been pressed.

Annotations
@Override
isKeyPressedback to summary
public boolean isKeyPressed(int key)

Implements com.badlogic.gdx.Input.isKeyPressed.

Doc from com.badlogic.gdx.Input.isKeyPressed.

Returns whether the key is pressed.

Annotations
@Override
setCatchKeyback to summary
public void setCatchKey(int keycode, boolean catchKey)

Implements com.badlogic.gdx.Input.setCatchKey.

Doc from com.badlogic.gdx.Input.setCatchKey.

Sets whether the given key on Android or GWT should be caught. No effect on other platforms. All keys that are not caught may be handled by other apps or background processes on Android, or may trigger default browser behaviour on GWT. For example, media or volume buttons are handled by background media players if present, or Space key triggers a scroll. All keys you need to control your game should be caught to prevent unintended behaviour.

Annotations
@Override