How to dynamically bind input using C++?

Hi,

I have createed one keyboard configuration menu , where user cancustomize their desired input keys. I am reading and writnig to my datatable and it works fine. But how to add those binding dynamically in defaultinput.ini file , so that player does corresponding action when that key is pressed. I need to do something like below , but I cannot find the option to pass key and value parameters , along with the scale factor , in the inputcomponent class.

    int rowindex = 1;
while (true)
{

          FKeyBoardBindingTable* LookUpRow = GameHUD->KeyBoardBindingTable-  
         ``>FindRow<FKeyBoardBindingTable>(FName(*FString::FromInt(rowindex)), TEXT("Look Up"));
	if (LookUpRow)
	{
		if (LookUpRow->Action == "Move Forward" || LookUpRow->Action == "Move Backward" || LookUpRow->Action == "Move Left" || LookUpRow->Action == "Move Right"
			|| LookUpRow->Action == "Walk Fast/Sprint" || LookUpRow->Action == "Run")
		{
			
			
			FInputAxisKeyBinding keybinding;
			keybinding.AxisKey = FKey(FName(*LookUpRow->Action));
			keybinding.AxisValue = 1;
			InputComponent->AxisKeyBindings.Add(keybinding);
		}
		else
		{
			
		}
		rowindex++;
	}
	else
	{
		break;
	}
}

I solved it myself. I dont know why I dont get any response for more technical questions :

First you need to include these namespaces :

“Runtime/Engine/Classes/GameFramework/PlayerInput.h”

“Runtime/Engine/Classes/GameFramework/InputSettings.h”

“Runtime/CoreUObject/Public/UObject/UObjectGlobals.h”

This is how I add items to axisbinding :

              const FInputAxisKeyMapping axismapping(FName("Move Forward"), FKey(FName(*LookUpRow->Input)) , 1);

		    const UInputSettings* InputSettings = GetDefault<UInputSettings>();
			((UInputSettings*)InputSettings)->AddAxisMapping(axismapping);
			((UInputSettings*)InputSettings)->SaveKeyMappings();

And this is how I add items to actionbinding

const FInputActionKeyMapping actionmapping(FName(*LookUpRow->Action), FKey(FName(*LookUpRow->Input)), false , false , false , false);

                     const UInputSettings* InputSettings = GetDefault<UInputSettings>();
		   ((UInputSettings*)InputSettings)->AddActionMapping(actionmapping);
		   ((UInputSettings*)InputSettings)->SaveKeyMappings();

Thanks for this, and for the more detailed tutorial at the forums