Are you using the MCU of Arduino? If yes, you can define a character array to store this string, then judge the value of the button to return to the home page, and send this string when the button is detected to be pressed.