changed readChar to keyPressed and changed the 'l' and 'r' to ASCII
equivalent.