# Problem with Enhanced Input and Split Screen on UE 5.1

**URL:** <https://forums.unrealengine.com/t/problem-with-enhanced-input-and-split-screen-on-ue-5-1/714667>\
**Category:** Blueprint\
**Tags:** Input, unreal-engine, Blueprint, question\
**Created:** [November 24, 2022, 3:59pm UTC](https://forums.unrealengine.com/t/problem-with-enhanced-input-and-split-screen-on-ue-5-1/714667 "2022-11-24T15:59:08Z")\
**Posts on this page:** 16\
**Page:** 2

<div class="post-metadata">

**Author:** ![Cookseyyyyy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Cookseyyyyy](https://forums.unrealengine.com/u/Cookseyyyyy)\
**Post date:** [March 11, 2023, 1:33pm UTC](https://forums.unrealengine.com/t/problem-with-enhanced-input-and-split-screen-on-ue-5-1/714667/22 "2023-03-11T13:33:35Z")

</div>

Just to reply to this. I’ve been having the same issue and it’s been driving me crazy. None of these solutions worked for me however.

That being said it suddenly just kind of worked for me but in a very strange way.

Essentially if I play in an editor window straight away only P1 seems to work. If I tab out and back in however it just works!

I need to do some more testing to check if this fixes things for my game but it’s at least highlighted that this is simply an editor bug, not a problem with my code.

Wish I’d known that a week ago.

I did a quick screencap showing my issue.

[https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/f/1/7f1a8c5d6f1f6000f32c97d08987fdc7f96c22e5.mp4](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/f/1/7f1a8c5d6f1f6000f32c97d08987fdc7f96c22e5.mp4)

---

<div class="post-metadata">

**Author:** ![RicardoEPRodrigues](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ricardoeprodrigues/32/918672_2.png) [@RicardoEPRodrigues](https://forums.unrealengine.com/u/RicardoEPRodrigues)\
**Post date:** [April 27, 2023, 1:48pm UTC](https://forums.unrealengine.com/t/problem-with-enhanced-input-and-split-screen-on-ue-5-1/714667/23 "2023-04-27T13:48:20Z")

</div>

Hello everyone,

I also have this issue, and while I got it to work in the editor, it does not work in the executable.  
I did however find a solution in my game. Small intro, my game is a 2-player adversarial game. Each player controls a character and battles each other to see who wins.

**I found that the first time I initialize my second player, it will fail to grab the input device, but if I delete the first instantiation and create a new second player, it will grab the gamepad.**

To get the input to work I did the following. In my custom Gamemode:

```cpp
// HEADER
class ACustomGameMode // ...
{
        
	UFUNCTION()
	void DelayedBeginPlay();
}

```

```cpp
// CPP
void ACustomGameMode::BeginPlay()
{
	Super::BeginPlay();
        // ... more code ...

        // Create a player controller
	SecondPlayerController = UGameplayStatics::GetPlayerController(GetWorld(), 1);
	if (!SecondPlayerController)
	{
		SecondPlayerController = UGameplayStatics::CreatePlayer(GetWorld(), 1);
	}

        // Set a timer for a delayed BeginPlay
	if (GetWorld())
	{
		GetWorld()->GetTimerManager().SetTimer(DelayedBeginPlayTimer, this, &ABestOutOfGameMode::DelayedBeginPlay, 0.2f);
	}
}

void ACustomGameMode::DelayedBeginPlay()
{
        // Delete the Player Controller we created
	SecondPlayerController = UGameplayStatics::GetPlayerController(GetWorld(), 1);
	if (SecondPlayerController)
	{
		UGameplayStatics::RemovePlayer(SecondPlayerController, false);
		SecondPlayerController = nullptr;
	}

        // Create a new Player Controller
	if (!SecondPlayerController)
	{
		SecondPlayerController = UGameplayStatics::CreatePlayer(GetWorld(), 1);
	}
}

```

Furthermore, I followed the instructions by @davabase and it seems to work. I do propose another solution that seems to work for me, which is to override the `PossessedBy()` function and call the `BindInputs()` there.

```cpp

void AMyCharacter::PossessedBy(AController* NewController)
{
	Super::PossessedBy(NewController);
	
	BindInputs();
}

```

It seems to work for me. Try it out and let me know if it works for you.

---

<div class="post-metadata">

**Author:** ![enzoravo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/enzoravo/32/906582_2.png) [@enzoravo](https://forums.unrealengine.com/u/enzoravo)\
**Post date:** [June 29, 2023, 12:18am UTC](https://forums.unrealengine.com/t/problem-with-enhanced-input-and-split-screen-on-ue-5-1/714667/24 "2023-06-29T00:18:57Z")

</div>

i was facing the same issue, you saved my day! thank you @DokiDerg !

---

<div class="post-metadata">

**Author:** ![tobiasthorsen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@tobiasthorsen](https://forums.unrealengine.com/u/tobiasthorsen)\
**Post date:** [July 6, 2023, 11:00am UTC](https://forums.unrealengine.com/t/problem-with-enhanced-input-and-split-screen-on-ue-5-1/714667/25 "2023-07-06T11:00:51Z")

</div>

Has anyone gotten this to work on a MAC?  
I feel like i have tried everything here. I made delays, i tabbed in and out, i made blueprint solutions and c++ solutions. No response ever from my second gamepad.

edit: i installed unreal engine 5.2.1 (previously on 5.1.1) and created the simplest of projects - nothing. No matter what i do, nothing will let me detect inputs on second game controller. I am sure it works, because i have been playing games with both on the same machine.

---

<div class="post-metadata">

**Author:** ![Uno1982](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/uno1982/32/982436_2.png) [@Uno1982](https://forums.unrealengine.com/u/Uno1982)\
**Post date:** [August 1, 2023, 3:20am UTC](https://forums.unrealengine.com/t/problem-with-enhanced-input-and-split-screen-on-ue-5-1/714667/26 "2023-08-01T03:20:31Z")

</div>

you don’t need the context mapping in the pawn you can actually just add it directly to the controller you create in the gamemode → create local player-\> EIS local player subsystem-\> add mapping context. This way you don’t need a delay because your not casting from the player to a controller that may not have possessed the pawn just yet.  
I’ve done something similar here in the video below.

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/5/a/75a13cfbc01296bc5ac47f45f2ae0078b1d703ac.jpeg "UE5.1 & UE5.2 Local Multiplayer Fix/Tips (Gamemode Logic)") ](https://www.youtube.com/watch?v=QSnUqHF6X0M)

---

<div class="post-metadata">

**Author:** ![Uno1982](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/uno1982/32/982436_2.png) [@Uno1982](https://forums.unrealengine.com/u/Uno1982)\
**Post date:** [August 1, 2023, 2:28pm UTC](https://forums.unrealengine.com/t/problem-with-enhanced-input-and-split-screen-on-ue-5-1/714667/27 "2023-08-01T14:28:49Z")

</div>

Yes … this is still present in UE5.2 and UE5.3 preview. Window focus appears to affect only the additional controllers but not input context for local controller index 1.

---

<div class="post-metadata">

**Author:** ![mikedolan03](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mikedolan03](https://forums.unrealengine.com/u/mikedolan03)\
**Post date:** [September 17, 2023, 2:48pm UTC](https://forums.unrealengine.com/t/problem-with-enhanced-input-and-split-screen-on-ue-5-1/714667/28 "2023-09-17T14:48:21Z")

</div>

can confirm this still happens and your work around works in 5.2

---

<div class="post-metadata">

**Author:** ![mikedolan03](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mikedolan03](https://forums.unrealengine.com/u/mikedolan03)\
**Post date:** [September 17, 2023, 3:04pm UTC](https://forums.unrealengine.com/t/problem-with-enhanced-input-and-split-screen-on-ue-5-1/714667/29 "2023-09-17T15:04:47Z")

</div>

I found a simple solution to getting my second controller to work.

i figured out something that might be the issue. The controller stuff seems to have to do with ‘focus’ - which is why alt-tabbing in and out works. since the game requires you to click the screen when testing in editor the focus is delayed.

Another way to give the game window focus immediately is the ‘Game Gets Mouse Control’ checkbox in the Level Editor Play settings in the Editor Preferences. Checking this box seems to give both players focus and the start and then both controllers work.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/7/e/97ee56b2c1407fe6b117d5a6e771bed1278907d8.png)

---

<div class="post-metadata">

**Author:** ![matahari](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/matahari/32/1184253_2.png) [@matahari](https://forums.unrealengine.com/u/matahari)\
**Post date:** [October 6, 2023, 10:09am UTC](https://forums.unrealengine.com/t/problem-with-enhanced-input-and-split-screen-on-ue-5-1/714667/30 "2023-10-06T10:09:56Z")

</div>

Same here… Using v5.3.1 on M1 Mac. I am afraid, BP/C++ solutions proposed in this topic do not work for me as well. Not even on a simple 3rd person template.

---

<div class="post-metadata">

**Author:** ![tobiasthorsen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@tobiasthorsen](https://forums.unrealengine.com/u/tobiasthorsen)\
**Post date:** [October 22, 2023, 7:20pm UTC](https://forums.unrealengine.com/t/problem-with-enhanced-input-and-split-screen-on-ue-5-1/714667/31 "2023-10-22T19:20:55Z")

</div>

Sad! I am a bit worried that this issue will result in me not being able to support couch multiplayer on a mac platform at all. I get that this is probably 0.01 % of users, but still it is horribly annoying as I am developing here and it would be nice to get it to work. Alternatively I need to switch to PC… I’ve gotten used to mac now… Sigh…

---

<div class="post-metadata">

**Author:** ![Uno1982](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/uno1982/32/982436_2.png) [@Uno1982](https://forums.unrealengine.com/u/Uno1982)\
**Post date:** [November 15, 2023, 4:35pm UTC](https://forums.unrealengine.com/t/problem-with-enhanced-input-and-split-screen-on-ue-5-1/714667/32 "2023-11-15T16:35:41Z")

</div>

Funny thing is that KristofMorva saw this coming back in 2019 and his feature never got approved.  
[Add functionality to map devices to player controllers by KristofMorva · Pull Request #5209 · EpicGames/UnrealEngine (github.com)](https://github.com/EpicGames/UnrealEngine/pull/5209)

Some context below for those of you without git access.  
Assigning player controllers to devices is currently very limited in Unreal Engine, the only possibility (besides coding it manually) is to start assigning gamepads from the second player instead of the first one.  
However, there are numerous very general cases, where such functionality is not enough, like:

- Splitscreen race games, one player with ADWS, another one with arrows. The current system does not support sharing a device between controllers.
- Turn-based local multiplayer games, with every player having their own controller. We can’t redirect inputs from devices to whichever player controller we would like.

There is a huge amount of discussions regarding this limitation, but just a few one:

- [Multiple playercontrollers using keyboard - Character & Animation - Epic Developer Community Forums](https://answers.unrealengine.com/questions/35177/multiple-playercontrollers-using-keyboard.html)
- [https://forums.unrealengine.com/development-discussion/blueprint-visual-scripting/1518794-how-to-manually-assign-gamepad-or-keyboard-input-to-player-controllers](https://forums.unrealengine.com/development-discussion/blueprint-visual-scripting/1518794-how-to-manually-assign-gamepad-or-keyboard-input-to-player-controllers)
- [https://udn.unrealengine.com/questions/456991/view.html](https://udn.unrealengine.com/questions/456991/view.html) (UDN account required)

This PR proposes a **mapping between devices and player controllers** to solve this issue. Developers are able to specify, which device should a given player controller get the signal from.  
It can be set with a `SetPhysicalControllerMapping` static function, but it’s currently also placed in the “Maps & Modes → Local Multiplayer” project settings category for convenience so that developer with static requirements can get it done without coding a single line.

It should be entirely backward compatible - not filling up the mapping array will result in the exact same results as it does now.

---

<div class="post-metadata">

**Author:** ![Uno1982](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/uno1982/32/982436_2.png) [@Uno1982](https://forums.unrealengine.com/u/Uno1982)\
**Post date:** [November 15, 2023, 4:40pm UTC](https://forums.unrealengine.com/t/problem-with-enhanced-input-and-split-screen-on-ue-5-1/714667/33 "2023-11-15T16:40:26Z")

</div>

[Viewport Utilities in Code Plugins - UE Marketplace (unrealengine.com)](https://www.unrealengine.com/marketplace/en-US/product/viewport-utilities)  
Stopped support after 4.27 but I’ll reach out to see if I can poke for a 5.1 review and maybe get movement on at least a fix for EIS and the Skip Player 1 bool in binary.

---

<div class="post-metadata">

**Author:** ![Vaei](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/vaei/32/710746_2.png) [@Vaei](https://forums.unrealengine.com/u/Vaei)\
**Post date:** [February 24, 2024, 2:09pm UTC](https://forums.unrealengine.com/t/problem-with-enhanced-input-and-split-screen-on-ue-5-1/714667/34 "2024-02-24T14:09:16Z")

</div>

Epic deprecated:

```cpp
ENGINE_API virtual bool InputAxis(FViewport* Viewport, int32 ControllerId, FKey Key, float Delta, float DeltaTime, int32 NumSamples=1, bool bGamepad=false) override;

```

In favor of:

```cpp
ENGINE_API virtual bool InputAxis(FViewport* Viewport, FInputDeviceId InputDevice, FKey Key, float Delta, float DeltaTime, int32 NumSamples = 1, bool bGamepad = false) override;

```

Notice the lack of a ControllerId? Yep…

However, they have provided a `RemapControllerInput(EventArgs);` you can override to increment the `ControllerId` as needed.

And they have implemented the option to do it for you via `bOffsetPlayerGamepadIds` which appears in project settings as `Skip Assigning Gamepad to Player 1`.

However, later in the code it calls:

```cpp
ULocalPlayer* const TargetPlayer = GEngine->GetLocalPlayerFromInputDevice(this, EventArgs.InputDevice);
if (TargetPlayer && TargetPlayer->PlayerController)
{
	bResult = TargetPlayer->PlayerController->InputKey(FInputKeyParams(EventArgs.Key, (double)Delta, DeltaTime, NumSamples, EventArgs.IsGamepad(), EventArgs.InputDevice));
}

```

Its using the wrong function, the `ControllerId` is never used, it needs to use `GetLocalPlayerFromControllerId` for this to work as intended (or work at all!).

Sloppy work. I looked at the 5.4 source code and it still isn’t fixed in the next release either.

But of course you could override `InputAxis`, copy/paste it, and fix it – but nope, those input events are private so you cannot do that.

HOWEVER, `UGameViewportClient::OnOverrideInputAxisEvent` will allow you to implement your own behaviour.

Talk about misusing virtual functions, Epic!

This was my first attempt, but its incorrect:

```cpp
void UMyGameViewportClient::Init(FWorldContext& WorldContext, UGameInstance* OwningGameInstance,
	bool bCreateNewAudioDevice)
{
	Super::Init(WorldContext, OwningGameInstance, bCreateNewAudioDevice);
	
	OnOverrideInputAxis().BindUObject(this, &ThisClass::OnOverrideInputAxisHandler);
}

bool UMyGameViewportClient::OnOverrideInputAxisHandler(FInputKeyEventArgs& EventArgs, float& Delta, float& DeltaTime,
	int32& NumSamples)
{
	const ULocalPlayer* const TargetPlayer = GEngine->GetLocalPlayerFromControllerId(this, EventArgs.ControllerId);
	if (TargetPlayer && TargetPlayer->PlayerController)
	{
		TargetPlayer->PlayerController->InputKey(FInputKeyParams(EventArgs.Key, (double)Delta, DeltaTime, NumSamples, EventArgs.IsGamepad(), EventArgs.InputDevice));
	}

	// If we failed here, don't let it route back to player 0
	return true;
}

```

The Player 2 Id is not always local player + 1, if you remove/add players that number keeps going up, even if you only have a total of 2, the first might be 0 and after a few remove/add the second might be 13!

We need to factor that in:

```cpp
#include "System/MyGameViewportClient.h"

#include "GameFramework/PlayerInput.h"

#include UE_INLINE_GENERATED_CPP_BY_NAME(MyGameViewportClient)

void UMyGameViewportClient::Init(FWorldContext& WorldContext, UGameInstance* OwningGameInstance,
	bool bCreateNewAudioDevice)
{
	Super::Init(WorldContext, OwningGameInstance, bCreateNewAudioDevice);

	OnOverrideInputAxis().BindUObject(this, &ThisClass::OnOverrideInputAxisHandler);
	OnOverrideInputKey().BindUObject(this, &ThisClass::OnOverrideInputKeyHandler);
}

APlayerController* UMyGameViewportClient::GetPlayerTwoController(const FInputDeviceId& InputDevice) const
{
	const ULocalPlayer* const PlayerOne = GEngine->GetLocalPlayerFromInputDevice(this, InputDevice);
	const APlayerController* PlayerOneController = PlayerOne->PlayerController;
	
	TArray<APlayerController*> PlayerControllers;
	GEngine->GetAllLocalPlayerControllers(PlayerControllers);

	if (PlayerControllers.Num() != 2)
	{
		return nullptr;
	}

	return (PlayerControllers[0] == PlayerOneController) ? PlayerControllers[1] : PlayerControllers[0];
}

bool UMyGameViewportClient::OnOverrideInputAxisHandler(FInputKeyEventArgs& EventArgs, float& Delta, float& DeltaTime,
	int32& NumSamples)
{
	if (!EventArgs.IsGamepad()) { return false;	}

	if (APlayerController* PlayerController = GetPlayerTwoController(EventArgs.InputDevice))
	{
		PlayerController->InputKey(FInputKeyParams(EventArgs.Key, (double)Delta, DeltaTime, NumSamples, EventArgs.IsGamepad(), EventArgs.InputDevice));
	}

	// If we failed here, don't let it route back to player 0
	return true;
}

bool UMyGameViewportClient::OnOverrideInputKeyHandler(FInputKeyEventArgs& EventArgs)
{
	if (!EventArgs.IsGamepad()) { return false;	}

	if (APlayerController* PlayerController = GetPlayerTwoController(EventArgs.InputDevice))
	{
		PlayerController->InputKey(FInputKeyParams(EventArgs.Key, EventArgs.Event, static_cast<double>(EventArgs.AmountDepressed), EventArgs.IsGamepad(), EventArgs.InputDevice));
	}

	// If we failed here, don't let it route back to player 0
	return true;
}

```

However, it still didn’t work, and that was because I was missing the setting `bFilterInputByPlatformUser` (you can find this in project settings, DISABLE it! It blocks any input that comes from a device that isn’t registered to the player. And of course, the engine doesn’t draw any link between these settings.

Now it works.

---

<div class="post-metadata">

**Author:** ![Swornh](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Swornh](https://forums.unrealengine.com/u/Swornh)\
**Post date:** [January 26, 2025, 3:19pm UTC](https://forums.unrealengine.com/t/problem-with-enhanced-input-and-split-screen-on-ue-5-1/714667/35 "2025-01-26T15:19:16Z")

</div>

one thing to change on your character, unreal defaults the map context to “Event ReceivedControllerChanged”. Which cause all this mess

Instead use a “Event Possessed” to map and Unpossessed to release the mapping on the character. So this make sure the map context only happens when you call possess, and not before it, where everything get messed up.

So on your game mode you spaw the third person character (or whatever character you have), then posses it with the controller, which will then trigger the mapping context.

Using game mode event “HandleStartNewPlayer” this happens on any game mode, even stand alone split screen.

On split screen, you call Create Local Player, or Create Local Player for User Platfor, and after that, it will trigger game mode HandleStartNewPlayer.

To be extra safe, on the character, create a custom event, call it “Client possessed”, and set it to “Run on Owning Client”,  
and on “Possessed” just redirect to “Client possessed”, that will prevent server errors when also having this on online multiplayer

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/4/6/e46576ec56aeeba2160436fa9446824d9a7bad7b.jpeg)

---

<div class="post-metadata">

**Author:** ![szabot0412](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@szabot0412](https://forums.unrealengine.com/u/szabot0412)\
**Post date:** [February 21, 2025, 6:04pm UTC](https://forums.unrealengine.com/t/problem-with-enhanced-input-and-split-screen-on-ue-5-1/714667/36 "2025-02-21T18:04:35Z")

</div>

Thank You @Vaei, you are a real Hero!

With your clear description and code snippet, i was able to do split keyboard control in elegant way, without cross referencing players and routing input events between them.

---

<div class="post-metadata">

**Author:** ![Lighe\_arrows](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lighe\_arrows](https://forums.unrealengine.com/u/Lighe_arrows)\
**Post date:** [December 23, 2025, 5:04am UTC](https://forums.unrealengine.com/t/problem-with-enhanced-input-and-split-screen-on-ue-5-1/714667/37 "2025-12-23T05:04:15Z")

</div>

After field testing, split screen input is abnormal in 5.1 and 5.2. It is normal for me to use 5.0 and 5.4,4.27. The controller and keyboard/mouse inputs were correctly sent to different controllers.

[Previous page](https://forums.unrealengine.com/t/problem-with-enhanced-input-and-split-screen-on-ue-5-1/714667.md?page=1)
