基于UE4的输入框架,开发的输入插件UE4CustomInputDevice,可以支持自定义的软件或者硬件输入设备。
主要思路为,基于IInputDeviceModule创建一个自定义的设备模块,基于IInputDevice创建一个自定义的设备,然后在设备中增加输入按键或者输入轴,并触发输入事件。
#include "CustomInput.h"
#include "CustomInputDevice.h"
#include "Runtime/InputCore/Classes/InputCoreTypes.h"
#include "core.h"
const FKey TestKey("TestKey");
const FKey TestAxis("TestAXIS");
FCustomInputDevice::FCustomInputDevice(const TSharedRef<FGenericApplicationMessageHandler>&a