KeyPressEvent

public final class KeyPressEvent(source)

A KeyPressEvent represents a key press registered by the InputHandler.

Constructors

Link copied to clipboard
public void KeyPressEvent(KarelWorld world, Key key)
Constructs an KeyPressEvent with the given world and key code.

Properties

Link copied to clipboard
public final Key key
Link copied to clipboard
public final KarelWorld world

Functions

Link copied to clipboard
public Key getKey()
Returns the key code of the key that triggered this KeyPressEvent.
Link copied to clipboard
Returns the world displayed by the interface that triggered this KeyPressEvent.