Added support for ESCAPE key when reading input