see Players Movement (Java) - OpenProcessing
see keyPressed and keyReleased with java(eclipse) - #3 by GoToLoop