Make a List of Buttons Produce their Index Number?

I’m trying to make a kind of keypad with buttons, so button labeled “1” will produce a 1, etc.
How can I have the button produce its own index number in the list?

The “1” key would be element 0, so pressing it should be “Index Number + 1” and so on with the other buttons. How can I code this?`using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class Register : MonoBehaviour {

[SerializeField] List<Button> registerKeys = new List<Button>();
// Use this for initialization
void Start () {
	
}

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

public void GetKeyNumber()
{
    Debug.Log(// Index Number +1);
}`

In the inspector, drag & drop the buttons in the correct order (key 1, key 2, key 3, …)

[SerializeField] List<Button> registerKeys = new List<Button>();
 // Use this for initialization
 void Start ()
{
    for( int i = 0 ; i < registerKeys.Count ; ++i )
    {
         int keyIndex = i + 1 ;
         if( registerKeys *!= null )*

registerKeys*.onClick.AddListener( () => OnKeyPressed( keyIndex ) );*
}
}

private void OnKeyPressed( int keyIndex )
{
Debug.Log( keyIndex );
}