Key handler event and SPEED constant added to cat program