# Detect input device

**URL:** <https://forums.unrealengine.com/t/detect-input-device/414096>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [January 9, 2018, 12:36am UTC](https://forums.unrealengine.com/t/detect-input-device/414096 "2018-01-09T00:36:13Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_6f0e22f9](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6f0e22f9](https://forums.unrealengine.com/u/anonymous_user_6f0e22f9)\
**Post date:** [January 9, 2018, 12:36am UTC](https://forums.unrealengine.com/t/detect-input-device/414096/1 "2018-01-09T00:36:13Z")

</div>

Hi,

How can i detect from what device input is coming?  
Like: keyboard and mice, xbox controller, PS controller or etc

Thanks in advance,

---

<div class="post-metadata">

**Author:** ![ViceVersa](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ViceVersa](https://forums.unrealengine.com/u/ViceVersa)\
**Post date:** [January 11, 2018, 3:27am UTC](https://forums.unrealengine.com/t/detect-input-device/414096/2 "2018-01-11T03:27:33Z")

</div>

make an input action for left joystick (and you can add any other controller inputs as well) and make a second input action for wasd (or mouse or other keys) in the player blueprint, when the input action for the controller is used, set a boolean variable called UsingGamepad to true. when the input action event for the keyboard one is used, set that boolean variable to false. You can use branches with that boolean anywhere else in the blueprint where thats needed

---

<div class="post-metadata">

**Author:** ![walldiv](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@walldiv](https://forums.unrealengine.com/u/walldiv)\
**Post date:** [July 9, 2019, 3:38pm UTC](https://forums.unrealengine.com/t/detect-input-device/414096/3 "2019-07-09T15:38:30Z")

</div>

FYI - This fires ALL THE TIME - with 0 Gamepad hooked up to the PC. This method doesnt work…

[https://puu.sh/DQEN8/05ee8a83f0.png](https://puu.sh/DQEN8/05ee8a83f0.png)

---

<div class="post-metadata">

**Author:** ![Teyrham](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Teyrham](https://forums.unrealengine.com/u/Teyrham)\
**Post date:** [August 21, 2021, 5:43pm UTC](https://forums.unrealengine.com/t/detect-input-device/414096/4 "2021-08-21T17:43:33Z")

</div>

Since all of the answers for this question i found were trash here’s mine:

1. Use event “Any Key” to get a key pressed
2. Use “Is keyboard key” on it to check if it’s a keyboard key
3. Switch on the bool your functions to view the text or images.  
I’m using “get display name” straight from input settings so my mechanic is index dependant. Also used two branches in case i want more devices.

 ![346896-2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/d/1/fd18361d8c4cf1a50c50cba1b62e5f0709d02e97.png)

---

<div class="post-metadata">

**Author:** ![yourboypavs](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@yourboypavs](https://forums.unrealengine.com/u/yourboypavs)\
**Post date:** [May 26, 2024, 6:22pm UTC](https://forums.unrealengine.com/t/detect-input-device/414096/5 "2024-05-26T18:22:01Z")

</div>

In UE 5.3, using the Input Device Subsystem worked really well for me:

 ![ue5_input_device_id](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/9/0/690aaa1eaef4bbcd1e303813dd70a8f6b5600642.png)

The Hardware Device Identifier comes back telling you the specific gamepad, if you want to switch between PlayStation and Xbox controller specific UI. For example, the keyboard and mouse returns “KBM” and an Xbox controller returns “XInputController”.

---

<div class="post-metadata">

**Author:** ![Online\_Learner\_1jcia](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Online\_Learner\_1jcia](https://forums.unrealengine.com/u/Online_Learner_1jcia)\
**Post date:** [September 6, 2024, 3:41am UTC](https://forums.unrealengine.com/t/detect-input-device/414096/7 "2024-09-06T03:41:32Z")

</div>

That’s so important, I can’t believe it didn’t exist until version 5.3.  
Thank for your hint!

---

<div class="post-metadata">

**Author:** ![doctorpepperdan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@doctorpepperdan](https://forums.unrealengine.com/u/doctorpepperdan)\
**Post date:** [September 6, 2024, 3:58am UTC](https://forums.unrealengine.com/t/detect-input-device/414096/8 "2024-09-06T03:58:49Z")

</div>

On any key event you can call “is gamepad key” or “is keyboard key” ect…

---

<div class="post-metadata">

**Author:** ![NibbleByteSSG](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NibbleByteSSG](https://forums.unrealengine.com/u/NibbleByteSSG)\
**Post date:** [March 11, 2025, 2:34pm UTC](https://forums.unrealengine.com/t/detect-input-device/414096/9 "2025-03-11T14:34:33Z")

</div>

Unreal’s input system is a joke (haven’t tried the Enhanced one yet).

PS: to save you the head banging - this function returns invalid result if the device NEVER made any input (because the data is populated on a button press for example). So Unreal knows there are devices, but doesn’t know what they are… brilliant…

---

<div class="post-metadata">

**Author:** ![Datsumo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Datsumo](https://forums.unrealengine.com/u/Datsumo)\
**Post date:** [March 20, 2025, 1:40am UTC](https://forums.unrealengine.com/t/detect-input-device/414096/10 "2025-03-20T01:40:56Z")

</div>

God bless you \<3
