Download

Editor AZERTY keyboard compatibility without rebuilding source

Hi everyone,

I’m trying to make the maximum uses of non compiling solutions to make the ue4 editor azerty keyboard compatible.

I managed to do a lot by changing editor preferences.

But I’m struggling with the defaultPawn class, which seems to be built-in the editor source code,
the DefaultPawn.cpp file contains declaration of "EngineDefinedAxisMapping"s, in QWERTY


UPlayerInput::AddEngineDefinedAxisMapping(FInputAxisKeyMapping("DefaultPawn_MoveForward", EKeys::W, 1.f));
UPlayerInput::AddEngineDefinedAxisMapping(FInputAxisKeyMapping("DefaultPawn_MoveForward", EKeys::S, -1.f));
UPlayerInput::AddEngineDefinedAxisMapping(FInputAxisKeyMapping("DefaultPawn_MoveForward", EKeys::Up, 1.f));
UPlayerInput::AddEngineDefinedAxisMapping(FInputAxisKeyMapping("DefaultPawn_MoveForward", EKeys::Down, -1.f));
UPlayerInput::AddEngineDefinedAxisMapping(FInputAxisKeyMapping("DefaultPawn_MoveForward", EKeys::Gamepad_LeftY, 1.f));

UPlayerInput::AddEngineDefinedAxisMapping(FInputAxisKeyMapping("DefaultPawn_MoveRight", EKeys::A, -1.f));
UPlayerInput::AddEngineDefinedAxisMapping(FInputAxisKeyMapping("DefaultPawn_MoveRight", EKeys::D, 1.f));
UPlayerInput::AddEngineDefinedAxisMapping(FInputAxisKeyMapping("DefaultPawn_MoveRight", EKeys::Gamepad_LeftX, 1.f));

UPlayerInput::AddEngineDefinedAxisMapping(FInputAxisKeyMapping("DefaultPawn_MoveUp", EKeys::Gamepad_LeftThumbstick, 1.f));
UPlayerInput::AddEngineDefinedAxisMapping(FInputAxisKeyMapping("DefaultPawn_MoveUp", EKeys::Gamepad_RightThumbstick, -1.f));
UPlayerInput::AddEngineDefinedAxisMapping(FInputAxisKeyMapping("DefaultPawn_MoveUp", EKeys::Gamepad_FaceButton_Bottom, 1.f));
UPlayerInput::AddEngineDefinedAxisMapping(FInputAxisKeyMapping("DefaultPawn_MoveUp", EKeys::LeftControl, -1.f));
UPlayerInput::AddEngineDefinedAxisMapping(FInputAxisKeyMapping("DefaultPawn_MoveUp", EKeys::SpaceBar, 1.f));
UPlayerInput::AddEngineDefinedAxisMapping(FInputAxisKeyMapping("DefaultPawn_MoveUp", EKeys::C, -1.f));
UPlayerInput::AddEngineDefinedAxisMapping(FInputAxisKeyMapping("DefaultPawn_MoveUp", EKeys::E, 1.f));
UPlayerInput::AddEngineDefinedAxisMapping(FInputAxisKeyMapping("DefaultPawn_MoveUp", EKeys::Q, -1.f));

Adding the corresponding axis directly in the editor input prefs only adds a layer of control, but does not remove the old bindings
For instance, adding the Q to opposite moveright, makes the defaultPawn move left AND down.

Do you think it would be possible to override/remove those EngineDefinedAxisMappings in config files ?
I tried something like this :


;-----------------------------------------------------------------------------------------
; DefaultPawn Azerty Axis properties
;-----------------------------------------------------------------------------------------
-AxisConfig=(AxisKeyName="DefaultPawn_MoveForward")
-AxisConfig=(AxisKeyName="DefaultPawn_MoveRight")
-AxisConfig=(AxisKeyName="DefaultPawn_MoveUp")

+AxisConfig=(AxisKeyName="DefaultPawn_MoveForward",AxisProperties=(DeadZone=0.25,Exponent=1.f,Sensitivity=1.f))
+AxisConfig=(AxisKeyName="DefaultPawn_MoveRight",AxisProperties=(DeadZone=0.25,Exponent=1.f,Sensitivity=1.f))
+AxisConfig=(AxisKeyName="DefaultPawn_MoveUp",AxisProperties=(DeadZone=0.25,Exponent=1.f,Sensitivity=1.f))

+AxisMappings=(AxisName="DefaultPawn_MoveForward",Scale=1.000000,Scale=1.000000,Key=Z);
+AxisMappings=(AxisName="DefaultPawn_MoveForward",Scale=-1.000000,Scale=1.000000,Key=S);
+AxisMappings=(AxisName="DefaultPawn_MoveForward",Scale=1.000000,Scale=1.000000,Key=Up);
+AxisMappings=(AxisName="DefaultPawn_MoveForward",Scale=-1.000000,Scale=1.000000,Key=Down);
+AxisMappings=(AxisName="DefaultPawn_MoveForward",Scale=1.000000,Scale=1.000000,Key=Gamepad_LeftY);

+AxisMappings=(AxisName="DefaultPawn_MoveRight",Scale=-1.000000,Scale=1.000000,Key=Q);
+AxisMappings=(AxisName="DefaultPawn_MoveRight",Scale=1.000000,Scale=1.000000,Key=D);
+AxisMappings=(AxisName="DefaultPawn_MoveRight",Scale=1.000000,Scale=1.000000,Key=Gamepad_LeftX);

+AxisMappings=(AxisName="DefaultPawn_MoveUp",Scale=1.000000,Scale=1.000000,Key=Gamepad_LeftThumbstick);
+AxisMappings=(AxisName="DefaultPawn_MoveUp",Scale=-1.000000,Scale=1.000000,Key=Gamepad_RightThumbstick);
+AxisMappings=(AxisName="DefaultPawn_MoveUp",Scale=1.000000,Scale=1.000000,Key=Gamepad_FaceButton_Bottom);
+AxisMappings=(AxisName="DefaultPawn_MoveUp",Scale=-1.000000,Scale=1.000000,Key=LeftControl);
+AxisMappings=(AxisName="DefaultPawn_MoveUp",Scale=1.000000,Scale=1.000000,Key=SpaceBar);
+AxisMappings=(AxisName="DefaultPawn_MoveUp",Scale=-1.000000,Scale=1.000000,Key=C);
+AxisMappings=(AxisName="DefaultPawn_MoveUp",Scale=1.000000,Scale=1.000000,Key=E);
+AxisMappings=(AxisName="DefaultPawn_MoveUp",Scale=-1.000000,Scale=1.000000,Key=A);

But at no avail.

Is there another custom .ini line I can use ?
Maybe something like this ?:


-EngineDefinedAxisConfig=(AxisKeyName="DefaultPawn_MoveForward")
-EngineDefinedAxisConfig=(AxisKeyName="DefaultPawn_MoveRight")
-EngineDefinedAxisConfig=(AxisKeyName="DefaultPawn_MoveUp")

The whole idea is to have the defaultPawn respond only to AZERTY inputs, the ideal solution would be placed in editor .ini files only, as it travels easily in beetween computers/ue4 versions.

Thanks by advance.
S