CTRL standalone as action?

Hello,

I want use the CTRL Key standalone as action, but it dont my way.

In defined in the DefaultInput.INI this:

+ActionMappings=(ActionName="SetCombat",Key=None,bShift=False,bCtrl=True,bAlt=False,bCmd=False)

In my PlayerController I definied the InputComponent and my handler.

InputComponent:

void APrototypeArgentumPlayerController::SetupInputComponent()
{
	// set up gameplay key bindings
	Super::SetupInputComponent();

	InputComponent->BindAction("SetCombat", IE_Pressed, this, &APrototypeArgentumPlayerController::OnSetCombatPressed);
	InputComponent->BindAction("SetCombat", IE_Released, this, &APrototypeArgentumPlayerController::OnSetCombatReleased);
}

Handlers:

void APrototypeArgentumPlayerController::OnSetCombatPressed()
{
	// Todo: ...
}

void APrototypeArgentumPlayerController::OnSetCombatReleased()
{
	// Todo: ...
}

Basicly I want switch in-game into a Comat State via. CTRL only.

Cheers,

Well you set key to “None” so it won’t work, ctrl should be a key. Why don’t you try setting up bindings in Project Settings?

It’s working via. the DefaultInput.INI. When I look in the Project-Settings I can see the entry. When I set Key to A for example it’s working with CTRL+A.

But your advice makes sense :smiley: I try to find a Key for CTRL.

Update: OMG, that was easy thanks… I was to tired… I overseen the Left CTRL and Right CTRL Key in the Combobox -.- Now it works, thx.