To be clear, do you mean a button ‘on the controller’ or ‘button in a widget’? And you want to get a reference to the player from the widget?
In a widget:
Button on a game controller:
and in the character: