cleand up return press event handling code