keyPressed method doesn't work as intended

Printable View