ControllerHawkRuntime Index

Class Documentation

struct FButtonAssignSpec
#include <IDirectInputDeviceBackend.h>

Maps an internal joystick button to a gamepad key.

Public Functions

inline FButtonAssignSpec()
FButtonAssignSpec(class DirectInputDevice *InputDevice, int32 InDeviceIndex, FGamepadKeyNames::Type InTargetKey)

Public Members

int32 DeviceIndex = {-1}

The internal index into the device’s button list.

FString ObjectName

The internal name of the device’s button.

FGamepadKeyNames::Type TargetKey

The Unreal key this button is mapped to.

struct FGameControllerBackendEntry
#include <IGameControllerInterface.h>

A specific backend entry matching a Vendor x Product to an IGameControllerBackend.

Public Functions

inline FGameControllerBackendEntry()
inline FGameControllerBackendEntry(int32 InVendorId, int32 InProductId, TSharedPtr<IGameControllerBackend> InBackendFactory)

Public Members

int32 VendorId = {0}

(Required) the vendor’s ID.

int32 ProductId = {0}

(Optional) the product ID. If left zero we match for any item from the vendor.

TSharedPtr<IGameControllerBackend> BackendFactory
class FGameControllerScope
#include <IGameControllerInterface.h>

Collaboration diagram for FGameControllerScope:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "1" [label="FGameControllerScope" tooltip="FGameControllerScope" fillcolor="#BFBFBF"]
    "2" [label="IGameControllerInterface" tooltip="IGameControllerInterface"]
    "3" [label="IGameControllerModuleInterface" tooltip="IGameControllerModuleInterface"]
    "4" [label="IInputDeviceModule" tooltip="IInputDeviceModule"]
    "1" -> "2" [dir=forward tooltip="usage"]
    "1" -> "3" [dir=forward tooltip="usage"]
    "3" -> "4" [dir=forward tooltip="public-inheritance"]
}

A scoped class meant to enhance the content of an FInputDeviceScope.

Public Functions

FGameControllerScope(IGameControllerInterface *InController, IGameControllerModuleInterface *InInterfaceDriver)

Constructor, this should only be allocated directly on the stack.

~FGameControllerScope()
FGameControllerScope() = delete

NOTE: This class cannot be copied/moved.

FGameControllerScope(const FGameControllerScope&) = delete
FGameControllerScope &operator=(const FGameControllerScope&) = delete
FGameControllerScope(FGameControllerScope&&) = delete
FGameControllerScope &operator=(FGameControllerScope&&) = delete

Public Members

class IGameControllerInterface *Controller

The contoller that is currently active on the scope.

class IGameControllerModuleInterface *InterfaceDriver

The interface that owns the controller.

Public Static Functions

static const FGameControllerScope *GetCurrent()

Returns the currently active GameControllerScope. This is only valid to call on the game thread and may return null.

Private Static Attributes

static TArray<FGameControllerScope*> ScopeStack
struct FGamepadKeyCache
#include <IGameControllerInterface.h>

A helper structure for tracking the values of various key and axis states.

Public Members

TMap<FGamepadKeyNames::Type, bool> BoolStates

Boolean states. Typically used for buttons.

TMap<FGamepadKeyNames::Type, float> FloatStates

Float states. Typically used for triggers and axes.

struct FGamepadRumbleStates
#include <IGameControllerInterface.h>

A helper structure keeping track of rumble states per controller by ID.

Public Functions

void SetChannelValue(int32 ControllerId, const FForceFeedbackChannelType ChannelType, const float Value)

Sets the specific feedback channel of a particular controller.

void SetChannelValues(int32 ControllerId, const FForceFeedbackValues &Values)

Overwrite all of the feedback channels for a particular controller.

Public Members

TMap<int32, FForceFeedbackValues> RumblePerController

The force feedback values per controller.

struct FHardwareControllerData

Public Functions

FString ToString() const

Public Members

int32 UserIndex = {-1}
int32 VendorId = {-1}
int32 ProductId = {-1}
int32 RevisionId = {-1}
struct FInputAxisConfig
#include <IDirectInputDeviceBackend.h>

Used to remap a DirectInput axis to a Key as well as how to intepret the value.

Public Functions

inline FInputAxisConfig()
inline FInputAxisConfig(FGamepadKeyNames::Type InAssignedKey, float InMultiplier, bool bInCenteredValue)

Public Members

FGamepadKeyNames::Type AssignedKey = {NAME_None}

Which key this axis belongs to.

float Multiplier = {1.0f}

What to multiply the axis value by. Usually 1 or -1.

bool bCenteredValue = {true}

Whether or not the value is centered (as reported by DirectInput)/.

struct FProductEntry

Public Functions

inline FProductEntry()
inline FProductEntry(const FString &InName, FGameplayTag InTag)

Public Members

FString Name = {TEXT("")}
FGameplayTag Tag
struct FScopedInputDeviceHandle
#include <InputSnifferSubsystem.h>

Collaboration diagram for FScopedInputDeviceHandle:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "2" [label="ControllerHawk::FHardwareControllerData" tooltip="ControllerHawk::FHardwareControllerData"]
    "1" [label="FScopedInputDeviceHandle" tooltip="FScopedInputDeviceHandle" fillcolor="#BFBFBF"]
    "1" -> "2" [dir=forward tooltip="usage"]
}

A struct that combines FInputDeviceId and FInputDeviceScope together. This data should never be saved (it is all transient runtime data).

Public Functions

FScopedInputDeviceHandle() = default
FScopedInputDeviceHandle(int32 InInternalDeviceId, const class FInputDeviceScope *Scope = nullptr)
FScopedInputDeviceHandle(int32 InInternalDeviceId, FHardwareDeviceIdentifier HwInfo)
inline bool operator==(const FScopedInputDeviceHandle &OtherHandle) const
inline bool operator!=(const FScopedInputDeviceHandle &OtherHandle) const

Public Members

FName InputDeviceName = {NAME_None}

Logical name of the input device interface. This is not translated but is platform-specific.

int32 HardwareDeviceHandle = {-1}

A system-specific device id, this is not the same as controllerId and represents a physical device instead of logical user. -1 represents an unknown device.

FString HardwareDeviceIdentifier = {TEXT("Unknown")}

Logical string identifying the hardware device. This is not translated and is system-specific, it may be empty.

FString BonusHardwareInfo
ControllerHawk::FHardwareControllerData ControllerData

The raw controller data (production information).

FGameplayTag ProductTag = {FGameplayTag::EmptyTag}

The product tag (if applicable). Of the form Gamepad.Microsoft.Xbox360, for example.

int32 InternalDeviceId = {-1}

This is the device ID passed around the input APIs (used for FInputDeviceId).

FInputDeviceId DeviceId
class IInputDevice *UnsafeRawInputDevice
class IDirectInputDeviceBackend : public IGameControllerBackend
#include <IDirectInputDeviceBackend.h>

Inheritence diagram for IDirectInputDeviceBackend:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "1" [label="IDirectInputDeviceBackend" tooltip="IDirectInputDeviceBackend" fillcolor="#BFBFBF"]
    "2" [label="IGameControllerBackend" tooltip="IGameControllerBackend"]
    "1" -> "2" [dir=forward tooltip="public-inheritance"]
}

Collaboration diagram for IDirectInputDeviceBackend:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "1" [label="IDirectInputDeviceBackend" tooltip="IDirectInputDeviceBackend" fillcolor="#BFBFBF"]
    "2" [label="IGameControllerBackend" tooltip="IGameControllerBackend"]
    "1" -> "2" [dir=forward tooltip="public-inheritance"]
}

A backend for a DirectInput device. You are typically only concerned with setting up a controller layout that maps correctly to Unreal’s frontend.

Public Functions

inline virtual ~IDirectInputDeviceBackend()
virtual TSharedPtr<IDirectInputDeviceBackend> Backend_Duplicate() = 0

Creates a copy of this backend.

virtual void DirectInput_OnAssignedAsBackend(class DirectInputDevice *InputDevice) = 0

Called when the backend is assigned. This is the place to generate the button and axis layouts.

virtual TMap<FGamepadKeyNames::Type, FButtonAssignSpec> &DirectInput_GetButtonLayout() = 0

Returns the computed button layout of this device.

virtual TMap<EDeviceObjectType, FInputAxisConfig> &DirectInput_GetAxisLayout() = 0

Returns the computed axis layout of this device.

Public Static Attributes

static const FName InterfaceIdentifier

The interface name for an DirectInput implementation. Use this with IGameControllerModuleInterface’s RegisterBackend, BackendsForInterface, and InterfaceIsHighestPriorityBackendProvider. SEE also DIRECT_INPUT_INTERFACE_ID

class IGameControllerBackend
#include <IGameControllerInterface.h>

Inheritence diagram for IGameControllerBackend:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "2" [label="IDirectInputDeviceBackend" tooltip="IDirectInputDeviceBackend"]
    "1" [label="IGameControllerBackend" tooltip="IGameControllerBackend" fillcolor="#BFBFBF"]
    "3" [label="IGameControllerBackendHID" tooltip="IGameControllerBackendHID"]
    "2" -> "1" [dir=forward tooltip="public-inheritance"]
    "3" -> "1" [dir=forward tooltip="public-inheritance"]
}

A backed to IGameControllerInterface. Think of this like quirks for a specific controller.

Subclassed by IDirectInputDeviceBackend, IGameControllerBackendHID

Public Functions

inline virtual ~IGameControllerBackend()
class IGameControllerBackendHID : public IGameControllerBackend
#include <IHumanInterfaceDevice.h>

Inheritence diagram for IGameControllerBackendHID:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "2" [label="IGameControllerBackend" tooltip="IGameControllerBackend"]
    "1" [label="IGameControllerBackendHID" tooltip="IGameControllerBackendHID" fillcolor="#BFBFBF"]
    "1" -> "2" [dir=forward tooltip="public-inheritance"]
}

Collaboration diagram for IGameControllerBackendHID:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "2" [label="IGameControllerBackend" tooltip="IGameControllerBackend"]
    "1" [label="IGameControllerBackendHID" tooltip="IGameControllerBackendHID" fillcolor="#BFBFBF"]
    "1" -> "2" [dir=forward tooltip="public-inheritance"]
}

A backend for a HID interface, matched to a specific vendor controller.

Public Functions

inline virtual ~IGameControllerBackendHID()
virtual TSharedPtr<IGameControllerBackendHID> Backend_Duplicate() = 0

Creates a copy of the device (like an object factory).

virtual void Controller_Poll(TSharedPtr<class IHumanInterfaceDevice> HID) = 0

Called when the device should be polled. Read packets and push updates to the device.

virtual void Controller_GetKeyStates(FGamepadKeyCache &OutStates) = 0

Returns the current key states.

virtual void Controller_SetForceFeedbackValues(const FForceFeedbackValues &InForceFeedback) = 0

Sets the force feedback values for the device. May not take effect until Controller_Poll() is called.

Public Static Attributes

static const FName InterfaceIdentifier

The interface name for an HID implementation. Use this with IGameControllerModuleInterface’s RegisterBackend, BackendsForInterface, and InterfaceIsHighestPriorityBackendProvider. See also HID_INTERFACE_ID

class IGameControllerInterface
#include <IGameControllerInterface.h>

Inheritence diagram for IGameControllerInterface:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "1" [label="IGameControllerInterface" tooltip="IGameControllerInterface" fillcolor="#BFBFBF"]
    "2" [label="IHumanInterfaceDevice" tooltip="IHumanInterfaceDevice"]
    "2" -> "1" [dir=forward tooltip="public-inheritance"]
}

This is a specific controller instance mapped to a single device. These are collected and managed by Interface Drivers (IGameControllerModuleInterface).

Subclassed by IHumanInterfaceDevice

Public Functions

inline virtual ~IGameControllerInterface()
virtual const FString &Controller_GetIdentifier() const = 0

The identifier for this class of controller. Typically this is something generic reflecting the class of driver and not the specific device.

virtual bool Controller_IsConnected() const = 0

Whether or not this controller is connected.

virtual void Controller_SetConnected(bool bInConnected) = 0

Sets whether this controller is “connected” - i.e. it can be successfully enumerated and polled.

virtual bool Controller_IsRegistered() const = 0

Whether or not this controller has been registered with Unreal’s input system.

virtual void Controller_SetRegistered(bool bInRegistered) = 0

Set the controller as registered (should only be used by the interface driver).

virtual void Controller_PostReconnected() = 0

Called when the controller is enumerated (including re-resolving the controller post-enumeration).

virtual FString Controller_DevicePath() const = 0

A unique path for this device on this OS. This does not mean that this uniquely identifies the devices.

virtual FGuid Controller_UnderlyingDeviceGuid() const = 0

(Optional) A unique ID for the device.

virtual void Controller_GetProductInfo(ControllerHawk::FHardwareControllerData &OutInfo) const = 0

Retrieves controller identifying information. This is used for matching the controller with a visual representation.

virtual void Controller_Poll() = 0

Polls for any new information from the underlying device, updating states.

virtual int32 Controller_PlayerIndex() const = 0

Which player this controller is assigned to.

virtual void Controller_SetPlayerIndex(int32 InPlayerIndex) = 0

Sets the player we are assigned to.

virtual void Controller_GetKeyStates(FGamepadKeyCache &OutStates) = 0

The current known key states of the controller.

virtual void Controller_GetLastKeyStates(FGamepadKeyCache &OutStates) = 0

The last known key states of the controller.

virtual void Controller_StashKeyStates() = 0

When the interface driver consumes key events, it calls this function to caused OldKeyStates = CurrentKeyStates so it can detect changes from the controller and push them to the application later.

virtual void Controller_SetKeyRepeatTimeout(const FGamepadKeyNames::Type &KeyName, double Time) = 0

Sets when a held key should cause a repeat event.

virtual double Controller_GetKeyRepeatTimeout(const FGamepadKeyNames::Type &KeyName) = 0

Get when a key should trigger a repeat timeout.

virtual void Controller_SetForceFeedbackValues(const FForceFeedbackValues &InForceFeedback) = 0

Sets the force feedback state.

class IGameControllerModuleInterface : public IInputDeviceModule
#include <IGameControllerInterface.h>

Inheritence diagram for IGameControllerModuleInterface:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "1" [label="IGameControllerModuleInterface" tooltip="IGameControllerModuleInterface" fillcolor="#BFBFBF"]
    "2" [label="IInputDeviceModule" tooltip="IInputDeviceModule"]
    "1" -> "2" [dir=forward tooltip="public-inheritance"]
}

Collaboration diagram for IGameControllerModuleInterface:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "1" [label="IGameControllerModuleInterface" tooltip="IGameControllerModuleInterface" fillcolor="#BFBFBF"]
    "2" [label="IInputDeviceModule" tooltip="IInputDeviceModule"]
    "1" -> "2" [dir=forward tooltip="public-inheritance"]
}

An interface that manages a particular kind of controller tech backend. This is XInput, DirectInput, HID, etc.

Public Functions

inline virtual ~IGameControllerModuleInterface()
virtual const FName &ControllerModule_GetName() const = 0

Gets the overall name for this interface (i.e. “XInput”, “HID”, etc.)

virtual bool ControllerModule_HasRegisteredBackendForDevice(const ControllerHawk::FHardwareControllerData &ControllerData) = 0

Whether or not a specific controller is supported by this interface.

virtual int32 ControllerModule_DriverPriority() const = 0

What priority this interface takes over others. Some systems have multiple ways to interact with the same device (XInput, DirectInput, RawInput, HID, etc.) and this value (closer to 0 is higher priority) determines which interfaces are allowed to claim devices first. We call ControllerModule_HasRegisteredBackendForDevice() on the highest priority interface and then go down the chain.

class IGameControllerModuleManager
#include <IGameControllerInterface.h>

The Module Manager is responsible for keeping track of interfaces (HID, DirectInput, etc.) and backends (specific controllers implemented on each interface).

Public Functions

inline virtual ~IGameControllerModuleManager()
virtual void RegisterInterface(TSharedPtr<IGameControllerModuleInterface> Interface) = 0

Registers an instance of the controller module.

virtual void RegisterBackend(const FName &InterfaceName, int32 VendorId, int32 ProductId, TSharedPtr<IGameControllerBackend> Backend) = 0

Registers a copy-able instance of a backend. InterfaceName is matched to a registered IGameControllerModuleInterface.

virtual const TArray<FGameControllerBackendEntry> &BackendsForInterface(const FName &InterfaceName) = 0

The list of backends instlaled for a particular interface by name.

virtual bool InterfaceIsHighestPriorityBackendProvider(const FName &InterfaceName, int32 VendorId, int32 ProductId) = 0

Returns true if the interface by name has the highest priority implementation (backend) for the given vendor x product.

virtual bool DeviceHasAnyBackends(int32 VendorId, int32 ProductId) = 0

Returns true if there is at least one interface that provides a backend for the given vendor x product.

Public Static Functions

static IGameControllerModuleManager *Get()

Gets the global manager. Use this to register interfaces and backends.

class IHumanInterfaceDevice : public virtual IGameControllerInterface
#include <IHumanInterfaceDevice.h>

Inheritence diagram for IHumanInterfaceDevice:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "2" [label="IGameControllerInterface" tooltip="IGameControllerInterface"]
    "1" [label="IHumanInterfaceDevice" tooltip="IHumanInterfaceDevice" fillcolor="#BFBFBF"]
    "1" -> "2" [dir=forward tooltip="public-inheritance"]
}

Collaboration diagram for IHumanInterfaceDevice:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "2" [label="IGameControllerInterface" tooltip="IGameControllerInterface"]
    "1" [label="IHumanInterfaceDevice" tooltip="IHumanInterfaceDevice" fillcolor="#BFBFBF"]
    "1" -> "2" [dir=forward tooltip="public-inheritance"]
}

An OS-abstraction for a controller that uses a native HID API. It is assigned a specific device and backend so it can effectively send and receive data from the controller.

Public Functions

inline virtual ~IHumanInterfaceDevice()
virtual void HID_AssignBackend(TSharedPtr<IGameControllerBackendHID> InBackend) = 0

Assigns a backend to this device. This is a specific implementation that knows how to manipulate the HID Bus to configure the controller and receive input data from it.

virtual void HID_Open(const FString &DevicePath) = 0

Opens an OS-specific communication channel to the HID device at DevicePath.

virtual void HID_SetNonBlocking(bool bNonBlocking) = 0

Sets whether or not this device sends commands async or synchronously.

virtual int32 HID_Write(const TArray<uint8> &Data) = 0

Writes data on to the HID Bus. Returns the number of bytes written, or -1 if an error occurred.

virtual int32 HID_ReadTimeout(TArray<uint8> &OutData, int32 TimeoutMilliseconds) = 0

Reads data from the HID Bus. Result returned in OutData as a raw byte stream Waits for TimeoutMilliseconds before returning. A timeout of < 0 means “wait forever”. Returns the number of bytes read, or -1 if there was an underlying error.

virtual int32 HID_SendFeatureReport(const TArray<uint8> &Data) = 0

Sends a Feature Report to the device.

virtual int32 HID_GetInputReport(TArray<uint8> &InOutData) = 0

Receives an Input Report from the device.

virtual int32 HID_GetFeatureReport(TArray<uint8> &InOutData) = 0

Receives a Feature Report from the device.

virtual EHidBusType HID_BusType() const = 0

Returns the bus type for this HID connection.

virtual void HID_Close() = 0

Closes the HID Bus data stream and cleans up any outstanding OS resources from HID_Open().

class UControlChange_List : public UControlChangeDescriptionBase
#include <ControllerOverlayWidget.h>

Inheritence diagram for UControlChange_List:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "2" [label="UControlChangeDescriptionBase" tooltip="UControlChangeDescriptionBase"]
    "1" [label="UControlChange_List" tooltip="UControlChange_List" fillcolor="#BFBFBF"]
    "3" [label="UObject" tooltip="UObject"]
    "2" -> "3" [dir=forward tooltip="public-inheritance"]
    "1" -> "2" [dir=forward tooltip="public-inheritance"]
}

Collaboration diagram for UControlChange_List:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "2" [label="UControlChangeDescriptionBase" tooltip="UControlChangeDescriptionBase"]
    "1" [label="UControlChange_List" tooltip="UControlChange_List" fillcolor="#BFBFBF"]
    "3" [label="UObject" tooltip="UObject"]
    "2" -> "3" [dir=forward tooltip="public-inheritance"]
    "1" -> "2" [dir=forward tooltip="public-inheritance"]
}

The widget will gets its render transform freely changed. Assumes (0, 0) is a good default location.

Public Functions

virtual void ApplyToWidget(FKey MyKey, UWidget *WidgetToModify, class UControllerOverlayWidget *ControllerWidget) override

Override by subclass - applies the effect of this object to all of the assigned widgets.

Public Members

TArray<UControlChangeDescriptionBase*> List
class UControlChange_ModifyMaterialVector : public UControlChangeDescriptionBase
#include <ControllerOverlayWidget.h>

Inheritence diagram for UControlChange_ModifyMaterialVector:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "2" [label="UControlChangeDescriptionBase" tooltip="UControlChangeDescriptionBase"]
    "1" [label="UControlChange_ModifyMaterialVector" tooltip="UControlChange_ModifyMaterialVector" fillcolor="#BFBFBF"]
    "3" [label="UObject" tooltip="UObject"]
    "2" -> "3" [dir=forward tooltip="public-inheritance"]
    "1" -> "2" [dir=forward tooltip="public-inheritance"]
}

Collaboration diagram for UControlChange_ModifyMaterialVector:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "2" [label="UControlChangeDescriptionBase" tooltip="UControlChangeDescriptionBase"]
    "1" [label="UControlChange_ModifyMaterialVector" tooltip="UControlChange_ModifyMaterialVector" fillcolor="#BFBFBF"]
    "3" [label="UObject" tooltip="UObject"]
    "2" -> "3" [dir=forward tooltip="public-inheritance"]
    "1" -> "2" [dir=forward tooltip="public-inheritance"]
}

The widgets supplied must be a UImage with a Dynamic Material set as the ResourceObject of the brush.

Public Functions

virtual void ApplyToWidget(FKey MyKey, UWidget *WidgetToModify, class UControllerOverlayWidget *ControllerWidget) override

Override by subclass - applies the effect of this object to all of the assigned widgets.

Public Members

FName ParameterName = {NAME_None}

The name of the parameter to modify (must be a vector parameter).

FLinearColor ParameterModifier

How to modify the values of the parameter. Think of this like a mask on the material parameter.

class UControlChange_ModifyOpacity : public UControlChangeDescriptionBase
#include <ControllerOverlayWidget.h>

Inheritence diagram for UControlChange_ModifyOpacity:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "2" [label="UControlChangeDescriptionBase" tooltip="UControlChangeDescriptionBase"]
    "1" [label="UControlChange_ModifyOpacity" tooltip="UControlChange_ModifyOpacity" fillcolor="#BFBFBF"]
    "3" [label="UObject" tooltip="UObject"]
    "2" -> "3" [dir=forward tooltip="public-inheritance"]
    "1" -> "2" [dir=forward tooltip="public-inheritance"]
}

Collaboration diagram for UControlChange_ModifyOpacity:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "2" [label="UControlChangeDescriptionBase" tooltip="UControlChangeDescriptionBase"]
    "1" [label="UControlChange_ModifyOpacity" tooltip="UControlChange_ModifyOpacity" fillcolor="#BFBFBF"]
    "3" [label="UObject" tooltip="UObject"]
    "2" -> "3" [dir=forward tooltip="public-inheritance"]
    "1" -> "2" [dir=forward tooltip="public-inheritance"]
}

Widgets will have their opacity changed.

Public Functions

virtual void ApplyToWidget(FKey MyKey, UWidget *WidgetToModify, class UControllerOverlayWidget *ControllerWidget) override

Override by subclass - applies the effect of this object to all of the assigned widgets.

Public Members

float OpacityUp = {1.0f}

The opacity if the button is up.

float OpacityDown = {1.0f}

The opacity if the button is down.

class UControlChange_ModifyRotation : public UControlChangeDescriptionBase
#include <ControllerOverlayWidget.h>

Inheritence diagram for UControlChange_ModifyRotation:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "2" [label="UControlChangeDescriptionBase" tooltip="UControlChangeDescriptionBase"]
    "1" [label="UControlChange_ModifyRotation" tooltip="UControlChange_ModifyRotation" fillcolor="#BFBFBF"]
    "3" [label="UObject" tooltip="UObject"]
    "2" -> "3" [dir=forward tooltip="public-inheritance"]
    "1" -> "2" [dir=forward tooltip="public-inheritance"]
}

Collaboration diagram for UControlChange_ModifyRotation:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "2" [label="UControlChangeDescriptionBase" tooltip="UControlChangeDescriptionBase"]
    "1" [label="UControlChange_ModifyRotation" tooltip="UControlChange_ModifyRotation" fillcolor="#BFBFBF"]
    "3" [label="UObject" tooltip="UObject"]
    "2" -> "3" [dir=forward tooltip="public-inheritance"]
    "1" -> "2" [dir=forward tooltip="public-inheritance"]
}

Widgets will have their rotation changed.

Public Functions

virtual void ApplyToWidget(FKey MyKey, UWidget *WidgetToModify, class UControllerOverlayWidget *ControllerWidget) override

Override by subclass - applies the effect of this object to all of the assigned widgets.

Public Members

float RotationMultiplier = {1.0f}

Scale applied to axis change before adding it to the rotation of this widget.

class UControlChange_SwapButtonImage : public UControlChangeDescriptionBase
#include <ControllerOverlayWidget.h>

Inheritence diagram for UControlChange_SwapButtonImage:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "2" [label="UControlChangeDescriptionBase" tooltip="UControlChangeDescriptionBase"]
    "1" [label="UControlChange_SwapButtonImage" tooltip="UControlChange_SwapButtonImage" fillcolor="#BFBFBF"]
    "3" [label="UObject" tooltip="UObject"]
    "2" -> "3" [dir=forward tooltip="public-inheritance"]
    "1" -> "2" [dir=forward tooltip="public-inheritance"]
}

Collaboration diagram for UControlChange_SwapButtonImage:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "2" [label="UControlChangeDescriptionBase" tooltip="UControlChangeDescriptionBase"]
    "1" [label="UControlChange_SwapButtonImage" tooltip="UControlChange_SwapButtonImage" fillcolor="#BFBFBF"]
    "3" [label="UObject" tooltip="UObject"]
    "2" -> "3" [dir=forward tooltip="public-inheritance"]
    "1" -> "2" [dir=forward tooltip="public-inheritance"]
}

The widgets supplied shuold be a UImage where the Brush can have its texture changed at will.

Public Functions

virtual void ApplyToWidget(FKey MyKey, UWidget *WidgetToModify, class UControllerOverlayWidget *ControllerWidget) override

Override by subclass - applies the effect of this object to all of the assigned widgets.

Public Members

class UTexture2D *IfUp = {nullptr}

Texture to use if the button is up.

class UTexture2D *IfDown = {nullptr}

Texture to use if the button is down.

class UControlChange_TranslateAxisWidget : public UControlChangeDescriptionBase
#include <ControllerOverlayWidget.h>

Inheritence diagram for UControlChange_TranslateAxisWidget:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "2" [label="UControlChangeDescriptionBase" tooltip="UControlChangeDescriptionBase"]
    "1" [label="UControlChange_TranslateAxisWidget" tooltip="UControlChange_TranslateAxisWidget" fillcolor="#BFBFBF"]
    "3" [label="UObject" tooltip="UObject"]
    "2" -> "3" [dir=forward tooltip="public-inheritance"]
    "1" -> "2" [dir=forward tooltip="public-inheritance"]
}

Collaboration diagram for UControlChange_TranslateAxisWidget:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "2" [label="UControlChangeDescriptionBase" tooltip="UControlChangeDescriptionBase"]
    "1" [label="UControlChange_TranslateAxisWidget" tooltip="UControlChange_TranslateAxisWidget" fillcolor="#BFBFBF"]
    "3" [label="UObject" tooltip="UObject"]
    "2" -> "3" [dir=forward tooltip="public-inheritance"]
    "1" -> "2" [dir=forward tooltip="public-inheritance"]
}

The widget will gets its render transform freely changed. Assumes (0, 0) is a good default location.

Public Functions

virtual void ApplyToWidget(FKey MyKey, UWidget *WidgetToModify, class UControllerOverlayWidget *ControllerWidget) override

Override by subclass - applies the effect of this object to all of the assigned widgets.

Public Members

bool bApplyToX = {false}
bool bApplyToY = {false}
FVector2D AxisModifier

Value between [-1,1] per axis value. If you want this to only change the X, use [1, 0]. If you want to modify the axis partly, use something like [0.5, 0]. The value is fractional according to the size of the widget.

class UControlChangeDescriptionBase : public UObject
#include <ControllerOverlayWidget.h>

Inheritence diagram for UControlChangeDescriptionBase:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "1" [label="UControlChangeDescriptionBase" tooltip="UControlChangeDescriptionBase" fillcolor="#BFBFBF"]
    "3" [label="UControlChange_List" tooltip="UControlChange_List"]
    "4" [label="UControlChange_ModifyMaterialVector" tooltip="UControlChange_ModifyMaterialVector"]
    "5" [label="UControlChange_ModifyOpacity" tooltip="UControlChange_ModifyOpacity"]
    "6" [label="UControlChange_ModifyRotation" tooltip="UControlChange_ModifyRotation"]
    "7" [label="UControlChange_SwapButtonImage" tooltip="UControlChange_SwapButtonImage"]
    "8" [label="UControlChange_TranslateAxisWidget" tooltip="UControlChange_TranslateAxisWidget"]
    "2" [label="UObject" tooltip="UObject"]
    "1" -> "2" [dir=forward tooltip="public-inheritance"]
    "3" -> "1" [dir=forward tooltip="public-inheritance"]
    "4" -> "1" [dir=forward tooltip="public-inheritance"]
    "5" -> "1" [dir=forward tooltip="public-inheritance"]
    "6" -> "1" [dir=forward tooltip="public-inheritance"]
    "7" -> "1" [dir=forward tooltip="public-inheritance"]
    "8" -> "1" [dir=forward tooltip="public-inheritance"]
}

Collaboration diagram for UControlChangeDescriptionBase:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "1" [label="UControlChangeDescriptionBase" tooltip="UControlChangeDescriptionBase" fillcolor="#BFBFBF"]
    "2" [label="UObject" tooltip="UObject"]
    "1" -> "2" [dir=forward tooltip="public-inheritance"]
}

Object that is meant to modify a set of widgets based on key events.

Subclassed by UControlChange_List, UControlChange_ModifyMaterialVector, UControlChange_ModifyOpacity, UControlChange_ModifyRotation, UControlChange_SwapButtonImage, UControlChange_TranslateAxisWidget

Public Functions

void Apply(FKey MyKey, class UControllerOverlayWidget *ControllerWidget)

Call to apply the Key to the assigned widgets.

inline virtual void ApplyToWidget(FKey MyKey, UWidget *WidgetToModify, class UControllerOverlayWidget *ControllerWidget)

Override by subclass - applies the effect of this object to all of the assigned widgets.

Public Members

TArray<UWidget*> AssignedWidgets

The widgets that have been assigned.

class UControllerHawkSettings : public UDeveloperSettings
#include <ControllerHawkSettings.h>

Inheritence diagram for UControllerHawkSettings:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "1" [label="UControllerHawkSettings" tooltip="UControllerHawkSettings" fillcolor="#BFBFBF"]
    "2" [label="UDeveloperSettings" tooltip="UDeveloperSettings"]
    "1" -> "2" [dir=forward tooltip="public-inheritance"]
}

Collaboration diagram for UControllerHawkSettings:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "1" [label="UControllerHawkSettings" tooltip="UControllerHawkSettings" fillcolor="#BFBFBF"]
    "2" [label="UDeveloperSettings" tooltip="UDeveloperSettings"]
    "1" -> "2" [dir=forward tooltip="public-inheritance"]
}

@TODO: No settings to change yet.

Public Static Functions

static UControllerHawkSettings *Get()
class UControllerOverlayWidget : public UUserWidget
#include <ControllerOverlayWidget.h>

Inheritence diagram for UControllerOverlayWidget:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "1" [label="UControllerOverlayWidget" tooltip="UControllerOverlayWidget" fillcolor="#BFBFBF"]
    "2" [label="UUserWidget" tooltip="UUserWidget"]
    "1" -> "2" [dir=forward tooltip="public-inheritance"]
}

Collaboration diagram for UControllerOverlayWidget:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "4" [label="ControllerHawk::FHardwareControllerData" tooltip="ControllerHawk::FHardwareControllerData"]
    "3" [label="FScopedInputDeviceHandle" tooltip="FScopedInputDeviceHandle"]
    "1" [label="UControllerOverlayWidget" tooltip="UControllerOverlayWidget" fillcolor="#BFBFBF"]
    "2" [label="UUserWidget" tooltip="UUserWidget"]
    "3" -> "4" [dir=forward tooltip="usage"]
    "1" -> "2" [dir=forward tooltip="public-inheritance"]
    "1" -> "3" [dir=forward tooltip="usage"]
}

Base class for the controller overlay widget.

Public Functions

UControllerOverlayWidget(const FObjectInitializer &ObjectInitializer)
void BindWidgetToKey(FKey Key, class UWidget *Widget)

Assigns a specific widget to a key event. The we look up the key in ControlChangeDescriptions and then apply the control change object to the Widget.

bool IsKeyActivated(FKey Key, float Tolerance = 0.001f) const

Gets whether the key is active.

float GetKeyValue(FKey Key) const

Gets the value of the key ([0,1] for analog keys, 0 or 1 for button keys).

void AssignDeviceHandle(FScopedInputDeviceHandle InDeviceHandle)

Assigns this controller to a specific device. Think of this like setting a filter. You can set an empty device in order to receive all events.

Public Members

TMap<FKey, float> AxisStates

The states of different axis inputs.

TMap<FKey, bool> ButtonStates

The states of different button inputs.

TMap<FKey, UControlChangeDescriptionBase*> ControlChangeDescriptions

What do when a particular key is encountered.

TMap<FKey, FKey> PriorityAxisAliases

Maps Buttons to an Axis. If present, the axis will be preferred over the button when triggering state changes.

FScopedInputDeviceHandle DeviceHandle

The device this controller is specifically bound to. Optional. Set using AssignDeviceHandle().

bool bShowDynaKeys = {false}

Whether or not to show Dyna Keys - these are image widgets arranged in a stack of some kind instead of rendering the controller itself. Useful if you want a compact view or it would be impractical to show every key in a layout at once (for example, Keyboard and Mouse).

TMap<FKey, class UTexture2D*> DynaKeyTextureMap

The assigned textures per key event.

TArray<FKey> IgnoredDynaKeys

Keys that are ignored in DynaKeyTextureMap.

TMap<FKey, class UImage*> ActiveDynaKeyMap

The active dyna keys.

FScopedKeyEvent OnKeyEvent

Called when a key event fires.

FScopedAnalogEvent OnAnalogEvent

Called when an axis event fires.

Protected Functions

void AttachToInputSniffer()
void OnRawKeyEvent(const FKeyEvent &KeyEvent, bool bDown)
void OnRawAnalogEvent(const FAnalogInputEvent &AnalogInputEvent)
void ApplyControlChanges(FKey Key)
void FlushKeyStates()
virtual void NativePreConstruct() override
virtual void NativeConstruct() override
void OnDynaKeyInstalled(FKey Key, UImage *Image)

Called when a dyna key is activated.

inline virtual void OnDynaKeyInstalled_Implementation(FKey Key, UImage *Image)
inline virtual void OnKeyEvent_Implementation(const FScopedInputDeviceHandle &InDeviceHandle, const FKeyEvent &KeyEvent, bool bDown)
inline virtual void OnAnalogEvent_Implementation(const FScopedInputDeviceHandle &InDeviceHandle, const FAnalogInputEvent &AnalogInputEvent)

Protected Attributes

FString CachedHardwareIdentifier

Used to flush our buttons states in case a particular controller doesn’t support a particular input.

class UControllerTileWidget : public UUserWidget

Inheritence diagram for UControllerTileWidget:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "1" [label="UControllerTileWidget" tooltip="UControllerTileWidget" fillcolor="#BFBFBF"]
    "2" [label="UUserWidget" tooltip="UUserWidget"]
    "1" -> "2" [dir=forward tooltip="public-inheritance"]
}

Collaboration diagram for UControllerTileWidget:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "1" [label="UControllerTileWidget" tooltip="UControllerTileWidget" fillcolor="#BFBFBF"]
    "2" [label="UUserWidget" tooltip="UUserWidget"]
    "1" -> "2" [dir=forward tooltip="public-inheritance"]
}

Public Functions

UControllerTileWidget(const FObjectInitializer &ObjectInitializer)
void AssignDeviceHandle(const FScopedInputDeviceHandle &DeviceHandle, FGameplayTag GamepadTag)
void PresentControllerType(FGameplayTag GamepadTag)

Protected Functions

inline virtual void AssignDeviceHandle_Implementation(const FScopedInputDeviceHandle &DeviceHandle, FGameplayTag GamepadTag)
inline virtual void PresentControllerType_Implementation(FGameplayTag GamepadTag)
class UInputSnifferSubsystem : public UEngineSubsystem
#include <InputSnifferSubsystem.h>

Inheritence diagram for UInputSnifferSubsystem:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "2" [label="UEngineSubsystem" tooltip="UEngineSubsystem"]
    "1" [label="UInputSnifferSubsystem" tooltip="UInputSnifferSubsystem" fillcolor="#BFBFBF"]
    "1" -> "2" [dir=forward tooltip="public-inheritance"]
}

Collaboration diagram for UInputSnifferSubsystem:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "2" [label="UEngineSubsystem" tooltip="UEngineSubsystem"]
    "1" [label="UInputSnifferSubsystem" tooltip="UInputSnifferSubsystem" fillcolor="#BFBFBF"]
    "1" -> "2" [dir=forward tooltip="public-inheritance"]
}

Engine subsystem that sniffs for raw key and controller events.

Public Functions

virtual bool ShouldCreateSubsystem(UObject *Outer) const override
virtual void Initialize(FSubsystemCollectionBase &Collection) override
virtual void Deinitialize() override
TArray<class USniffedInputDevice*> GetInputDevices() const

Public Members

FRawKeyEvent OnRawKeyEvent

Bind to this to receive raw key events.

FRawAnalogEvent OnRawAnalogEvent

Bind to this to receive raw analog events.

FOnSniffedDeviceChanged OnDeviceAdded
FOnSniffedDeviceChanged OnDeviceChanged
FOnSniffedDeviceChanged OnDeviceRemoved

Public Static Functions

static int32 GetPlatformUserIdForDeviceHandle(FScopedInputDeviceHandle DeviceHandle)

Retrieves the currently mapped internal user ID for a given scoped device handle.

Protected Functions

bool TryConsumeKeyEvent(const FKeyEvent &InKeyEvent, bool bDown)
bool TryConsumeAnalogEvent(const FAnalogInputEvent &InAnalogInputEvent)
void HandleUserInputDeviceConnectionChange(EInputDeviceConnectionState NewConnectionState, FPlatformUserId PlatformUserId, FInputDeviceId InputDeviceId)
void HandleUserInputDevicePairingChange(FInputDeviceId InputDeviceId, FPlatformUserId NewUserPlatformId, FPlatformUserId OldUserPlatformId)
void RebuildDeviceList(TArray<FScopedInputDeviceHandle> ChangedDevices = {})
void ForwardOnDeviceChanged(USniffedInputDevice *Device)

Private Members

TSharedPtr<class IInputProcessor> InputProcessor
TArray<USniffedInputDevice*> InputDevices

Friends

friend class FRawInputProcessor
class USniffedInputDevice : public UObject

Inheritence diagram for USniffedInputDevice:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "2" [label="UObject" tooltip="UObject"]
    "1" [label="USniffedInputDevice" tooltip="USniffedInputDevice" fillcolor="#BFBFBF"]
    "1" -> "2" [dir=forward tooltip="public-inheritance"]
}

Collaboration diagram for USniffedInputDevice:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "4" [label="ControllerHawk::FHardwareControllerData" tooltip="ControllerHawk::FHardwareControllerData"]
    "3" [label="FScopedInputDeviceHandle" tooltip="FScopedInputDeviceHandle"]
    "2" [label="UObject" tooltip="UObject"]
    "1" [label="USniffedInputDevice" tooltip="USniffedInputDevice" fillcolor="#BFBFBF"]
    "3" -> "4" [dir=forward tooltip="usage"]
    "1" -> "2" [dir=forward tooltip="public-inheritance"]
    "1" -> "3" [dir=forward tooltip="usage"]
}

Public Functions

FGameplayTag GetGamepadTag() const
bool IsDevice(FScopedInputDeviceHandle InDeviceHandle) const
void ConfigureWithInformation(FPlatformUserId PlatformUserId, FScopedInputDeviceHandle InputDeviceHandle)

Public Members

int32 InternalUserId = {-1}
FScopedInputDeviceHandle DeviceHandle
FPlatformUserId UserId
FOnSniffedDeviceChanged OnDeviceChanged
namespace ControllerHawk

Functions

FString CreateUsbProductString(int32 VendorId, int32 ProductId, int32 Version)
FGameplayTag GetUsbProductTag(int32 VendorId, int32 ProductId, int32 Version = 0)
bool IsNintendoSwitchProUsb(const FString &ProductString)
bool IsSonyDualShockUsb(const FString &ProductString)

Variables

TMap<int32, FProductEntry> UsbVendorNames
TMap<int32, FProductEntry> UsbProductNames
file ControllerHawkSettings.h
#include “CoreMinimal.h”
#include “Engine/DeveloperSettings.h”
#include “ControllerHawkSettings.generated.h”

Include dependency graph for ControllerHawkSettings.h:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "1" [label="ControllerHawk/Source/ControllerHawkRuntime/Public/ControllerHawkSettings.h" tooltip="ControllerHawk/Source/ControllerHawkRuntime/Public/ControllerHawkSettings.h" fillcolor="#BFBFBF"]
    "4" [label="ControllerHawkSettings.generated.h" tooltip="ControllerHawkSettings.generated.h"]
    "2" [label="CoreMinimal.h" tooltip="CoreMinimal.h"]
    "3" [label="Engine/DeveloperSettings.h" tooltip="Engine/DeveloperSettings.h"]
    "1" -> "2" [dir=forward tooltip="include"]
    "1" -> "3" [dir=forward tooltip="include"]
    "1" -> "4" [dir=forward tooltip="include"]
}
file ControllerOverlayWidget.h
#include “CoreMinimal.h”
#include “Blueprint/UserWidget.h”
#include “Input/Events.h”
#include “InputCoreTypes.h”
#include “InputSnifferSubsystem.h
#include “ControllerOverlayWidget.generated.h”

Include dependency graph for ControllerOverlayWidget.h:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "3" [label="Blueprint/UserWidget.h" tooltip="Blueprint/UserWidget.h"]
    "1" [label="ControllerHawk/Source/ControllerHawkRuntime/Public/ControllerOverlayWidget.h" tooltip="ControllerHawk/Source/ControllerHawkRuntime/Public/ControllerOverlayWidget.h" fillcolor="#BFBFBF"]
    "6" [label="ControllerOverlayWidget.generated.h" tooltip="ControllerOverlayWidget.generated.h"]
    "2" [label="CoreMinimal.h" tooltip="CoreMinimal.h"]
    "4" [label="Input/Events.h" tooltip="Input/Events.h"]
    "5" [label="InputCoreTypes.h" tooltip="InputCoreTypes.h"]
    "1" -> "2" [dir=forward tooltip="include"]
    "1" -> "3" [dir=forward tooltip="include"]
    "1" -> "4" [dir=forward tooltip="include"]
    "1" -> "5" [dir=forward tooltip="include"]
    "1" -> "6" [dir=forward tooltip="include"]
}

Functions

DECLARE_DYNAMIC_MULTICAST_DELEGATE_ThreeParams(FScopedKeyEvent, const FScopedInputDeviceHandle&, InDeviceHandle, const FKeyEvent&, KeyEvent, bool, bDown)
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FScopedAnalogEvent, const FScopedInputDeviceHandle&, InDeviceHandle, const FAnalogInputEvent&, AnalogInputEvent)
file ControllerTileWidget.h
#include “CoreMinimal.h”
#include “Blueprint/UserWidget.h”
#include “InputSnifferSubsystem.h
#include “ControllerTileWidget.generated.h”

Include dependency graph for ControllerTileWidget.h:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "3" [label="Blueprint/UserWidget.h" tooltip="Blueprint/UserWidget.h"]
    "1" [label="ControllerHawk/Source/ControllerHawkRuntime/Public/ControllerTileWidget.h" tooltip="ControllerHawk/Source/ControllerHawkRuntime/Public/ControllerTileWidget.h" fillcolor="#BFBFBF"]
    "4" [label="ControllerTileWidget.generated.h" tooltip="ControllerTileWidget.generated.h"]
    "2" [label="CoreMinimal.h" tooltip="CoreMinimal.h"]
    "1" -> "2" [dir=forward tooltip="include"]
    "1" -> "3" [dir=forward tooltip="include"]
    "1" -> "4" [dir=forward tooltip="include"]
}
file IDirectInputDeviceBackend.h
#include “CoreMinimal.h”
#include “GenericPlatform/GenericApplicationMessageHandler.h”

Include dependency graph for IDirectInputDeviceBackend.h:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "1" [label="ControllerHawk/Source/ControllerHawkRuntime/Public/Drivers/IDirectInputDeviceBackend.h" tooltip="ControllerHawk/Source/ControllerHawkRuntime/Public/Drivers/IDirectInputDeviceBackend.h" fillcolor="#BFBFBF"]
    "2" [label="CoreMinimal.h" tooltip="CoreMinimal.h"]
    "3" [label="GenericPlatform/GenericApplicationMessageHandler.h" tooltip="GenericPlatform/GenericApplicationMessageHandler.h"]
    "1" -> "2" [dir=forward tooltip="include"]
    "1" -> "3" [dir=forward tooltip="include"]
}

Defines

DIRECT_INPUT_INTERFACE_ID

Enums

enum class EDeviceObjectType : uint8

The kind of DirectInput object a particular device object (i.e. button) is.

Values:

enumerator Unknown
enumerator XAxis
enumerator YAxis
enumerator ZAxis
enumerator RxAxis
enumerator RyAxis
enumerator RzAxis
enumerator Slider
enumerator Button
enumerator Key
enumerator Pov
enumerator HapticEngine
enumerator Collection
file IGameControllerInterface.h
#include “CoreMinimal.h”
#include “IInputDevice.h”
#include “IInputDeviceModule.h”
#include “GenericPlatform/IInputInterface.h”
#include “GenericPlatform/GenericApplicationMessageHandler.h”
#include “UsbVendorConstants.h

Include dependency graph for IGameControllerInterface.h:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "1" [label="ControllerHawk/Source/ControllerHawkRuntime/Public/Drivers/IGameControllerInterface.h" tooltip="ControllerHawk/Source/ControllerHawkRuntime/Public/Drivers/IGameControllerInterface.h" fillcolor="#BFBFBF"]
    "2" [label="CoreMinimal.h" tooltip="CoreMinimal.h"]
    "6" [label="GenericPlatform/GenericApplicationMessageHandler.h" tooltip="GenericPlatform/GenericApplicationMessageHandler.h"]
    "5" [label="GenericPlatform/IInputInterface.h" tooltip="GenericPlatform/IInputInterface.h"]
    "3" [label="IInputDevice.h" tooltip="IInputDevice.h"]
    "4" [label="IInputDeviceModule.h" tooltip="IInputDeviceModule.h"]
    "1" -> "2" [dir=forward tooltip="include"]
    "1" -> "3" [dir=forward tooltip="include"]
    "1" -> "4" [dir=forward tooltip="include"]
    "1" -> "5" [dir=forward tooltip="include"]
    "1" -> "6" [dir=forward tooltip="include"]
}

Defines

CONTROLLER_HAWK_REGISTER_MODULE(_name, _instance)

Called by a IGameControllerModuleInterface statically to register itself.

CONTROLLER_HAWK_REGISTER_BACKEND(_name, _iface, _vendor, _product, _instance)

Called by a IGameControllerBackend statically to register itself.

file IHumanInterfaceDevice.h
#include “CoreMinimal.h”

Include dependency graph for IHumanInterfaceDevice.h:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "1" [label="ControllerHawk/Source/ControllerHawkRuntime/Public/Drivers/IHumanInterfaceDevice.h" tooltip="ControllerHawk/Source/ControllerHawkRuntime/Public/Drivers/IHumanInterfaceDevice.h" fillcolor="#BFBFBF"]
    "2" [label="CoreMinimal.h" tooltip="CoreMinimal.h"]
    "1" -> "2" [dir=forward tooltip="include"]
}

Defines

HID_INTERFACE_ID
USB_PACKET_LENGTH

The typical length of a USB packet (for sending / receiving reports).

Enums

enum class EHidBusType : uint8

The type of bus the HID communicates from.

Values:

enumerator Unknown

Unknown source of communication.

enumerator USB

Communicates over USB.

enumerator Bluetooth

Communicates over Bluetooth.

enumerator I2C

Communicates over I2C.

enumerator SPI

Communicates over SPI.

file InputSnifferSubsystem.h
#include “CoreMinimal.h”
#include “Tickable.h”
#include “Kismet/GameplayStatics.h”
#include “Misc/CoreMiscDefines.h”
#include “Subsystems/EngineSubsystem.h”
#include “GameFramework/InputSettings.h”
#include “GameplayTagContainer.h”
#include “UsbVendorConstants.h
#include “InputSnifferSubsystem.generated.h”

Include dependency graph for InputSnifferSubsystem.h:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "1" [label="ControllerHawk/Source/ControllerHawkRuntime/Public/InputSnifferSubsystem.h" tooltip="ControllerHawk/Source/ControllerHawkRuntime/Public/InputSnifferSubsystem.h" fillcolor="#BFBFBF"]
    "2" [label="CoreMinimal.h" tooltip="CoreMinimal.h"]
    "7" [label="GameFramework/InputSettings.h" tooltip="GameFramework/InputSettings.h"]
    "8" [label="GameplayTagContainer.h" tooltip="GameplayTagContainer.h"]
    "9" [label="InputSnifferSubsystem.generated.h" tooltip="InputSnifferSubsystem.generated.h"]
    "4" [label="Kismet/GameplayStatics.h" tooltip="Kismet/GameplayStatics.h"]
    "5" [label="Misc/CoreMiscDefines.h" tooltip="Misc/CoreMiscDefines.h"]
    "6" [label="Subsystems/EngineSubsystem.h" tooltip="Subsystems/EngineSubsystem.h"]
    "3" [label="Tickable.h" tooltip="Tickable.h"]
    "1" -> "2" [dir=forward tooltip="include"]
    "1" -> "3" [dir=forward tooltip="include"]
    "1" -> "4" [dir=forward tooltip="include"]
    "1" -> "5" [dir=forward tooltip="include"]
    "1" -> "6" [dir=forward tooltip="include"]
    "1" -> "7" [dir=forward tooltip="include"]
    "1" -> "8" [dir=forward tooltip="include"]
    "1" -> "9" [dir=forward tooltip="include"]
}

Functions

DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FRawKeyEvent, const FKeyEvent&, Key, bool, bDown)

When a key event happens.

DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FRawAnalogEvent, const FAnalogInputEvent&, AnalogInput)

When an analog input event happens.

DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnSniffedDeviceChanged, USniffedInputDevice*, Device)

When a device changes state.

file UsbVendorConstants.h
#include “CoreMinimal.h”
#include “GameplayTagContainer.h”
#include “NativeGameplayTags.h”

Include dependency graph for UsbVendorConstants.h:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "1" [label="ControllerHawk/Source/ControllerHawkRuntime/Public/UsbVendorConstants.h" tooltip="ControllerHawk/Source/ControllerHawkRuntime/Public/UsbVendorConstants.h" fillcolor="#BFBFBF"]
    "2" [label="CoreMinimal.h" tooltip="CoreMinimal.h"]
    "3" [label="GameplayTagContainer.h" tooltip="GameplayTagContainer.h"]
    "4" [label="NativeGameplayTags.h" tooltip="NativeGameplayTags.h"]
    "1" -> "2" [dir=forward tooltip="include"]
    "1" -> "3" [dir=forward tooltip="include"]
    "1" -> "4" [dir=forward tooltip="include"]
}

Defines

USB_VENDOR_8BITDO
USB_VENDOR_AMAZON
USB_VENDOR_APPLE
USB_VENDOR_ASTRO
USB_VENDOR_BACKBONE
USB_VENDOR_GAMESIR
USB_VENDOR_DRAGONRISE
USB_VENDOR_GOOGLE
USB_VENDOR_HORI
USB_VENDOR_HP
USB_VENDOR_HYPERKIN
USB_VENDOR_LOGITECH
USB_VENDOR_MADCATZ
USB_VENDOR_MAYFLASH
USB_VENDOR_MICROSOFT
USB_VENDOR_NACON
USB_VENDOR_NACON_ALT
USB_VENDOR_NINTENDO
USB_VENDOR_NVIDIA
USB_VENDOR_PDP
USB_VENDOR_POWERA
USB_VENDOR_POWERA_ALT
USB_VENDOR_QANBA
USB_VENDOR_RAZER
USB_VENDOR_SAITEK
USB_VENDOR_SHANWAN
USB_VENDOR_SHANWAN_ALT
USB_VENDOR_SONY
USB_VENDOR_THRUSTMASTER
USB_VENDOR_TURTLE_BEACH
USB_VENDOR_VALVE
USB_VENDOR_ZEROPLUS
USB_PRODUCT_8BITDO_XBOX_CONTROLLER1
USB_PRODUCT_8BITDO_XBOX_CONTROLLER2
USB_PRODUCT_AMAZON_LUNA_CONTROLLER
USB_PRODUCT_ASTRO_C40_XBOX360
USB_PRODUCT_BACKBONE_ONE_IOS
USB_PRODUCT_BACKBONE_ONE_IOS_PS5
USB_PRODUCT_GAMESIR_G7
USB_PRODUCT_GOOGLE_STADIA_CONTROLLER
USB_PRODUCT_EVORETRO_GAMECUBE_ADAPTER1
USB_PRODUCT_EVORETRO_GAMECUBE_ADAPTER2
USB_PRODUCT_HORI_FIGHTING_COMMANDER_OCTA_SERIES_X
USB_PRODUCT_HORI_HORIPAD_PRO_SERIES_X
USB_PRODUCT_HORI_FIGHTING_STICK_ALPHA_PS4
USB_PRODUCT_HORI_FIGHTING_STICK_ALPHA_PS5
USB_PRODUCT_HORI_FIGHTING_STICK_ALPHA_PS5
USB_PRODUCT_LOGITECH_F310
USB_PRODUCT_LOGITECH_CHILLSTREAM
USB_PRODUCT_NACON_REVOLUTION_5_PRO_PS4_WIRELESS
USB_PRODUCT_NACON_REVOLUTION_5_PRO_PS4_WIRED
USB_PRODUCT_NACON_REVOLUTION_5_PRO_PS5_WIRELESS
USB_PRODUCT_NACON_REVOLUTION_5_PRO_PS5_WIRED
USB_PRODUCT_NINTENDO_GAMECUBE_ADAPTER
USB_PRODUCT_NINTENDO_N64_CONTROLLER
USB_PRODUCT_NINTENDO_SEGA_GENESIS_CONTROLLER
USB_PRODUCT_NINTENDO_SNES_CONTROLLER
USB_PRODUCT_NINTENDO_SWITCH_JOYCON_GRIP
USB_PRODUCT_NINTENDO_SWITCH_JOYCON_LEFT
USB_PRODUCT_NINTENDO_SWITCH_JOYCON_PAIR
USB_PRODUCT_NINTENDO_SWITCH_JOYCON_RIGHT
USB_PRODUCT_NINTENDO_SWITCH_PRO
USB_PRODUCT_NINTENDO_WII_REMOTE
USB_PRODUCT_NINTENDO_WII_REMOTE2
USB_PRODUCT_NVIDIA_SHIELD_CONTROLLER_V103
USB_PRODUCT_NVIDIA_SHIELD_CONTROLLER_V104
USB_PRODUCT_RAZER_ATROX
USB_PRODUCT_RAZER_PANTHERA
USB_PRODUCT_RAZER_PANTHERA_EVO
USB_PRODUCT_RAZER_RAIJU
USB_PRODUCT_RAZER_TOURNAMENT_EDITION_USB
USB_PRODUCT_RAZER_TOURNAMENT_EDITION_BLUETOOTH
USB_PRODUCT_RAZER_ULTIMATE_EDITION_USB
USB_PRODUCT_RAZER_ULTIMATE_EDITION_BLUETOOTH
USB_PRODUCT_RAZER_WOLVERINE_V2
USB_PRODUCT_RAZER_WOLVERINE_V2_CHROMA
USB_PRODUCT_RAZER_WOLVERINE_V2_PRO_PS5_WIRED
USB_PRODUCT_RAZER_WOLVERINE_V2_PRO_PS5_WIRELESS
USB_PRODUCT_RAZER_WOLVERINE_V2_PRO_XBOX_WIRED
USB_PRODUCT_RAZER_WOLVERINE_V2_PRO_XBOX_WIRELESS
USB_PRODUCT_SAITEK_CYBORG_V3
USB_PRODUCT_SHANWAN_DS3
USB_PRODUCT_SONY_DS3
USB_PRODUCT_SONY_DS4
USB_PRODUCT_SONY_DS4_DONGLE
USB_PRODUCT_SONY_DS4_SLIM
USB_PRODUCT_SONY_DS4_STRIKEPAD
USB_PRODUCT_SONY_DS5
USB_PRODUCT_SONY_DS5_EDGE
USB_PRODUCT_THRUSTMASTER_ESWAPX_PRO
USB_PRODUCT_TURTLE_BEACH_SERIES_X_REACT_R
USB_PRODUCT_TURTLE_BEACH_SERIES_X_RECON
USB_PRODUCT_VICTRIX_FS_PRO
USB_PRODUCT_VICTRIX_FS_PRO_V2
USB_PRODUCT_XBOX360_XUSB_CONTROLLER
USB_PRODUCT_XBOX360_WIRED_CONTROLLER
USB_PRODUCT_XBOX360_WIRELESS_RECEIVER
USB_PRODUCT_XBOX360_WIRELESS_RECEIVER_THIRDPARTY1
USB_PRODUCT_XBOX360_WIRELESS_RECEIVER_THIRDPARTY2
USB_PRODUCT_XBOX_ONE_ADAPTIVE
USB_PRODUCT_XBOX_ONE_ADAPTIVE_BLUETOOTH
USB_PRODUCT_XBOX_ONE_ADAPTIVE_BLE
USB_PRODUCT_XBOX_ONE_ELITE_SERIES_1
USB_PRODUCT_XBOX_ONE_ELITE_SERIES_2
USB_PRODUCT_XBOX_ONE_ELITE_SERIES_2_BLUETOOTH
USB_PRODUCT_XBOX_ONE_ELITE_SERIES_2_BLE
USB_PRODUCT_XBOX_ONE_S
USB_PRODUCT_XBOX_ONE_S_REV1_BLUETOOTH
USB_PRODUCT_XBOX_ONE_S_REV2_BLUETOOTH
USB_PRODUCT_XBOX_ONE_S_REV2_BLE
USB_PRODUCT_XBOX_SERIES_X
USB_PRODUCT_XBOX_SERIES_X_BLE
USB_PRODUCT_XBOX_SERIES_X_HP_HYPERX
USB_PRODUCT_XBOX_SERIES_X_HP_HYPERX_RGB
USB_PRODUCT_XBOX_SERIES_X_PDP_AFTERGLOW
USB_PRODUCT_XBOX_SERIES_X_PDP_BLUE
USB_PRODUCT_XBOX_SERIES_X_POWERA_FUSION_PRO2
USB_PRODUCT_XBOX_SERIES_X_POWERA_MOGA_XP_ULTRA
USB_PRODUCT_XBOX_SERIES_X_POWERA_SPECTRA
USB_PRODUCT_XBOX_SERIES_X_VICTRIX_GAMBIT
USB_PRODUCT_XBOX_ONE_XBOXGIP_CONTROLLER
USB_PRODUCT_STEAM_VIRTUAL_GAMEPAD

Functions

UE_DECLARE_GAMEPLAY_TAG_EXTERN(Tag_Gamepad)

Base tag for specific controller types.

UE_DECLARE_GAMEPLAY_TAG_EXTERN(Tag_Gamepad_Unknown)
UE_DECLARE_GAMEPLAY_TAG_EXTERN(Tag_Gamepad_KeyboardMouse)
UE_DECLARE_GAMEPLAY_TAG_EXTERN(Tag_Gamepad_Microsoft)
UE_DECLARE_GAMEPLAY_TAG_EXTERN(Tag_Gamepad_Microsoft_Generic)
UE_DECLARE_GAMEPLAY_TAG_EXTERN(Tag_Gamepad_Microsoft_Xbox360)
UE_DECLARE_GAMEPLAY_TAG_EXTERN(Tag_Gamepad_Microsoft_Xbox360_Virtual)
UE_DECLARE_GAMEPLAY_TAG_EXTERN(Tag_Gamepad_Sony)
UE_DECLARE_GAMEPLAY_TAG_EXTERN(Tag_Gamepad_Sony_DS5)
UE_DECLARE_GAMEPLAY_TAG_EXTERN(Tag_Gamepad_Nintendo)
UE_DECLARE_GAMEPLAY_TAG_EXTERN(Tag_Gamepad_Nintendo_SwitchPro)
static inline float ShortToNormalizedFloat(int16 AxisVal)
static inline float RemapVal(float val, float val_min, float val_max, float output_min, float output_max)
dir ControllerHawk
dir ControllerHawk/Source/ControllerHawkRuntime
dir ControllerHawk/Source/ControllerHawkRuntime/Public/Drivers
dir ControllerHawk/Source/ControllerHawkRuntime/Public
dir ControllerHawk/Source