Pj3d
Pj3d Keyboard

Methods of the Pj3d object to detect keyboard inputs and keycodes. Please make sure that the Pj3d window is active.

Example:
Pj3d p = new Pj3d(this, 640, 480);
if (p.keyPressed == true)
{
    println("key pressed: "+(char)p.key);
}

Download: Pj3dInteraction.pde

Methods:
keyPressed
Check if a key is pressed.
returns: Boolean

keyReleased
Check if a key has been released.
returns: Boolean

key
Ascii value of the last pressed key. One can cast it with (char)key to a character.
returns: Integer

<- back