Applied the buttons flag for allowing enter key