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;
}
}