Handle Next and Done return keys.