ControllerHawkRuntime Index¶
Class Documentation¶
-
struct FButtonAssignSpec¶
- #include <IDirectInputDeviceBackend.h>
Maps an internal joystick button to a gamepad key.
-
struct FGameControllerBackendEntry¶
- #include <IGameControllerInterface.h>
A specific backend entry matching a Vendor x Product to an IGameControllerBackend.
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¶
-
int32 VendorId = {0}¶
-
class FGameControllerScope¶
- #include <IGameControllerInterface.h>
Collaboration diagram for FGameControllerScope:
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¶
-
FGameControllerScope(IGameControllerInterface *InController, IGameControllerModuleInterface *InInterfaceDriver)¶
-
struct FGamepadKeyCache¶
- #include <IGameControllerInterface.h>
A helper structure for tracking the values of various key and axis states.
-
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.
-
void SetChannelValue(int32 ControllerId, const FForceFeedbackChannelType ChannelType, const float Value)¶
-
struct FInputAxisConfig¶
- #include <IDirectInputDeviceBackend.h>
Used to remap a DirectInput axis to a Key as well as how to intepret the value.
-
struct FProductEntry¶
-
struct FScopedInputDeviceHandle¶
- #include <InputSnifferSubsystem.h>
Collaboration diagram for FScopedInputDeviceHandle:
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¶
-
FScopedInputDeviceHandle() = default¶
-
class IDirectInputDeviceBackend : public IGameControllerBackend¶
- #include <IDirectInputDeviceBackend.h>
Inheritence diagram for IDirectInputDeviceBackend:
Collaboration diagram for IDirectInputDeviceBackend:
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
-
inline virtual ~IDirectInputDeviceBackend()¶
-
class IGameControllerBackend¶
- #include <IGameControllerInterface.h>
Inheritence diagram for IGameControllerBackend:
A backed to IGameControllerInterface. Think of this like quirks for a specific controller.
Subclassed by IDirectInputDeviceBackend, IGameControllerBackendHID
Public Functions
-
inline virtual ~IGameControllerBackend()¶
-
inline virtual ~IGameControllerBackend()¶
-
class IGameControllerBackendHID : public IGameControllerBackend¶
- #include <IHumanInterfaceDevice.h>
Inheritence diagram for IGameControllerBackendHID:
Collaboration diagram for IGameControllerBackendHID:
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).
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
-
inline virtual ~IGameControllerBackendHID()¶
-
class IGameControllerInterface¶
- #include <IGameControllerInterface.h>
Inheritence diagram for IGameControllerInterface:
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.
-
inline virtual ~IGameControllerInterface()¶
-
class IGameControllerModuleInterface : public IInputDeviceModule¶
- #include <IGameControllerInterface.h>
Inheritence diagram for IGameControllerModuleInterface:
Collaboration diagram for IGameControllerModuleInterface:
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.
-
inline virtual ~IGameControllerModuleInterface()¶
-
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()¶
Registers an instance of the controller module.
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.
-
inline virtual ~IGameControllerModuleManager()¶
-
class IHumanInterfaceDevice : public virtual IGameControllerInterface¶
- #include <IHumanInterfaceDevice.h>
Inheritence diagram for IHumanInterfaceDevice:
Collaboration diagram for IHumanInterfaceDevice:
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()¶
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().
-
inline virtual ~IHumanInterfaceDevice()¶
-
class UControlChange_List : public UControlChangeDescriptionBase¶
- #include <ControllerOverlayWidget.h>
Inheritence diagram for UControlChange_List:
Collaboration diagram for UControlChange_List:
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¶
-
virtual void ApplyToWidget(FKey MyKey, UWidget *WidgetToModify, class UControllerOverlayWidget *ControllerWidget) override¶
-
class UControlChange_ModifyMaterialVector : public UControlChangeDescriptionBase¶
- #include <ControllerOverlayWidget.h>
Inheritence diagram for UControlChange_ModifyMaterialVector:
Collaboration diagram for UControlChange_ModifyMaterialVector:
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.
-
virtual void ApplyToWidget(FKey MyKey, UWidget *WidgetToModify, class UControllerOverlayWidget *ControllerWidget) override¶
-
class UControlChange_ModifyOpacity : public UControlChangeDescriptionBase¶
- #include <ControllerOverlayWidget.h>
Inheritence diagram for UControlChange_ModifyOpacity:
Collaboration diagram for UControlChange_ModifyOpacity:
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.
-
virtual void ApplyToWidget(FKey MyKey, UWidget *WidgetToModify, class UControllerOverlayWidget *ControllerWidget) override¶
-
class UControlChange_ModifyRotation : public UControlChangeDescriptionBase¶
- #include <ControllerOverlayWidget.h>
Inheritence diagram for UControlChange_ModifyRotation:
Collaboration diagram for UControlChange_ModifyRotation:
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.
-
virtual void ApplyToWidget(FKey MyKey, UWidget *WidgetToModify, class UControllerOverlayWidget *ControllerWidget) override¶
-
class UControlChange_SwapButtonImage : public UControlChangeDescriptionBase¶
- #include <ControllerOverlayWidget.h>
Inheritence diagram for UControlChange_SwapButtonImage:
Collaboration diagram for UControlChange_SwapButtonImage:
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.
-
virtual void ApplyToWidget(FKey MyKey, UWidget *WidgetToModify, class UControllerOverlayWidget *ControllerWidget) override¶
-
class UControlChange_TranslateAxisWidget : public UControlChangeDescriptionBase¶
- #include <ControllerOverlayWidget.h>
Inheritence diagram for UControlChange_TranslateAxisWidget:
Collaboration diagram for UControlChange_TranslateAxisWidget:
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.
-
virtual void ApplyToWidget(FKey MyKey, UWidget *WidgetToModify, class UControllerOverlayWidget *ControllerWidget) override¶
-
class UControlChangeDescriptionBase : public UObject¶
- #include <ControllerOverlayWidget.h>
Inheritence diagram for UControlChangeDescriptionBase:
Collaboration diagram for UControlChangeDescriptionBase:
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.
-
void Apply(FKey MyKey, class UControllerOverlayWidget *ControllerWidget)¶
-
class UControllerHawkSettings : public UDeveloperSettings¶
- #include <ControllerHawkSettings.h>
Inheritence diagram for UControllerHawkSettings:
Collaboration diagram for UControllerHawkSettings:
@TODO: No settings to change yet.
Public Static Functions
-
static UControllerHawkSettings *Get()¶
-
static UControllerHawkSettings *Get()¶
-
class UControllerOverlayWidget : public UUserWidget¶
- #include <ControllerOverlayWidget.h>
Inheritence diagram for UControllerOverlayWidget:
Collaboration diagram for UControllerOverlayWidget:
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.
-
UControllerOverlayWidget(const FObjectInitializer &ObjectInitializer)¶
-
class UControllerTileWidget : public UUserWidget¶
Inheritence diagram for UControllerTileWidget:
Collaboration diagram for UControllerTileWidget:
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)¶
-
UControllerTileWidget(const FObjectInitializer &ObjectInitializer)¶
-
class UInputSnifferSubsystem : public UEngineSubsystem¶
- #include <InputSnifferSubsystem.h>
Inheritence diagram for UInputSnifferSubsystem:
Collaboration diagram for UInputSnifferSubsystem:
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
-
virtual bool ShouldCreateSubsystem(UObject *Outer) const override¶
-
class USniffedInputDevice : public UObject¶
Inheritence diagram for USniffedInputDevice:
Collaboration diagram for USniffedInputDevice:
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¶
-
FGameplayTag GetGamepadTag() const¶
-
namespace ControllerHawk¶
- file ControllerHawkSettings.h
- #include “CoreMinimal.h”#include “Engine/DeveloperSettings.h”#include “ControllerHawkSettings.generated.h”
Include dependency graph for ControllerHawkSettings.h:
- 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:
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)¶
-
DECLARE_DYNAMIC_MULTICAST_DELEGATE_ThreeParams(FScopedKeyEvent, const FScopedInputDeviceHandle&, InDeviceHandle, const FKeyEvent&, KeyEvent, bool, bDown)¶
- file ControllerTileWidget.h
- #include “CoreMinimal.h”#include “Blueprint/UserWidget.h”#include “InputSnifferSubsystem.h”#include “ControllerTileWidget.generated.h”
Include dependency graph for ControllerTileWidget.h:
- file IDirectInputDeviceBackend.h
- #include “CoreMinimal.h”#include “GenericPlatform/GenericApplicationMessageHandler.h”#include “Drivers/IGameControllerInterface.h”
Include dependency graph for IDirectInputDeviceBackend.h:
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¶
-
enumerator Unknown¶
-
DIRECT_INPUT_INTERFACE_ID¶
- 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:
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.
-
CONTROLLER_HAWK_REGISTER_MODULE(_name, _instance)¶
- file IHumanInterfaceDevice.h
- #include “CoreMinimal.h”#include “Drivers/IGameControllerInterface.h”
Include dependency graph for IHumanInterfaceDevice.h:
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.
-
enumerator Unknown¶
-
HID_INTERFACE_ID¶
- 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:
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.
-
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FRawKeyEvent, const FKeyEvent&, Key, bool, bDown)¶
- file UsbVendorConstants.h
- #include “CoreMinimal.h”#include “GameplayTagContainer.h”#include “NativeGameplayTags.h”
Include dependency graph for UsbVendorConstants.h:
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)¶
-
USB_VENDOR_8BITDO¶
- dir ControllerHawk
- dir ControllerHawk/Source/ControllerHawkRuntime
- dir ControllerHawk/Source/ControllerHawkRuntime/Public/Drivers
- dir ControllerHawk/Source/ControllerHawkRuntime/Public
- dir ControllerHawk/Source