As I understood the question, you can follow these steps,
Create a Canvas and a Button inside it.
Modify it as needed
Add this script as “CLICKHOLDER.cs” to the MainCamera.
using UnityEngine;
using System.Collections;
public class CameraCode : MonoBehaviour {
public void CLICK()
{
if (lightsMode == LightsMode.Inactive)
{
lightsMode = LightsMode.Active;
}
else if ( lightsMode == LightsMode.Active)
{
lightsMode = LightsMode.Inactive;
}
}
}
which makes the Input.GetKeyDown(KeyCode.H) == event
Go to the OnClick event section in the inspector window by selecting your button on the scene.
Click Add button, select MainCamera. and then the CLICKHOLDER in the combobox ahead,and select CLICK() method from the contextual menu that you found.
Hope this code helped you, or if not thanks for reading.