To begin, use the up and down arrow keys to scroll through the menu items. Once you have something selected, you can click the right arrow key to do it. If the second option (the "Hi" button) is open, click the left arrow key to close it.
This is somewhat based off of the battle systems in Undertale and Deltarune. There would usually be attacks when the border comes in, but I made this as more of a template than a full thing. The second option would contain options for talking the enemy. To attack, you hit the icon in the middle of the box that looks like the enemy after using the first option.