UI.Button via Keycode

Hey, sooooo my problem is that I want to instead of clicking the button via mouse, i want it to press it via keycode ( I will lock the cursor as crosshair, the game i’m making is First Person). this is where i want to press the button. I’ve tried the other solutions with this problem but none of them works, the main goal has been achieved, but this small control problem is the only thing i can’t seem to solve.

using System.Collections;

public class DecisionCounter : MonoBehaviour 
{
	public int yes;
	public int no;
	public GameObject decisionPanel, decisionObject;

	// Use this for initialization
	void Start ()
	{

	}
	
	// Update is called once per frame
	void Update () 
	{

	}

	public void YesButton() // this is the Button for the 'yes' 
	{
		if (Input.GetKeyDown (KeyCode.F) || Input.GetButtonDown ("360_YButton")) //the keycode i want to use
		{
			yes += 1; // this is the thingy the button will do when pressed.
			decisionPanel.SetActive (false);
			decisionObject.SetActive (false);
		}
	}


	public void NoButton()// the function for the 'no' button
	{

		if (Input.GetKeyDown (KeyCode.V) || Input.GetButtonDown ("360_YButton")) // this is the keycode i want to use
		{
			no += 1; // do this when pressed the V button
			GameObject thePlayer = GameObject.Find ("ambotnalang");
			pickup PickScript = thePlayer.GetComponent<pickup> ();
			PickScript.dropObject ();
		}

//		PickScript.checkDrop ();
	}
}

it would really be helpful if you can help me. (what? hahahah) Even a Pseudo Code would be helpful, but an example code is better, or whatever way you feel like <3 <3 thanks

I’ve solved my own problem <3 <3 but for anyone who has the same problem this is how i fixed it.

I created a new script that will store all my buttons in an array

[SerializeField] GameObject[] buttons;

then in every array (starts from button[0]) i call the button when a keycode has been clicked. via this script

if (Input.GetKeyDown (KeyCode.G) || Input.GetButtonDown ("360_YButton")) { ExecuteEvents.Execute<IPointerClickHandler> (buttons[0], new PointerEventData (EventSystem.current), ExecuteEvents.pointerClickHandler); }

i used this tutorial on youtube and kinda made my own version, his version uses number keys to control the buttons, link text

thanks anyways <3 <3 <3