![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <InputKeyEventArgs.h>
Static Public Member Functions | |
| static ENGINE_API FInputKeyEventArgs | CreateSimulated (const FKey &InKey, const EInputEvent InEvent, const float AmountDepressed, const int32 InNumSamplesOverride=-1, const FInputDeviceId InputDevice=INPUTDEVICEID_NONE, const bool bIsTouchEvent=false, FViewport *Viewport=nullptr) |
Public Attributes | |
| FViewport * | Viewport = nullptr |
| int32 | ControllerId |
| FInputDeviceId | InputDevice = INPUTDEVICEID_NONE |
| FKey | Key = {} |
| EInputEvent | Event = IE_MAX |
| float | AmountDepressed |
| float | DeltaTime = 1.0f / 60.f |
| int32 | NumSamples = 1 |
| bool | bIsTouchEvent = false |
| uint64 | EventTimestamp = 0u |
Input key event arguments. This is data that is required for the viewport client to process input via its InputKey/InputAxis functions.
It represents a single "input event" which has happened which we want game or editor code to be able to process. This may accumulate several "raw" input events from the message handler into one with multiple sample readings, or it could be just one single key press event.
This data can represent gamepad, keyboard, mouse, or touch data.
|
default |
| FInputKeyEventArgs::FInputKeyEventArgs | ( | FViewport * | InViewport, |
| const FInputDeviceId | InInputDevice, | ||
| const FKey & | InKey, | ||
| const EInputEvent | InEvent, | ||
| const float | InAmountDepressed, | ||
| const bool | bInIsTouchEvent, | ||
| const uint64 | InEventTimestamp | ||
| ) |
Construct a FInputKeyEventArgs based on data acquired from the Slate input events. These event args are used to translate from Slate input event arguments into a standardized form for the ViewportClient and then the rest of the gameplay framework.
| InViewport | The viewport which the axis movement is from. |
| InInputDevice | The input device that triggered this axis movement |
| InKey | The name of the axis which moved. |
| InEvent | The key event that these args represent. |
| InAmountDepressed | For axis events, the amount that the key is depressed |
| bInIsTouchEvent | True if this event represents a touch input |
| InEventTimestamp | The timestamp of when this input event was originally polled in the form of CPU cycles. |
|
inline |
|
inline |
Constrcut a FInputKeyEventArgs based on data acquired from the Slate input events. These event args are used to translate from Slate input event arguments into a standardized form for the ViewportClient and then the rest of the gameplay framework.
| InViewport | The viewport which the axis movement is from. |
| InInputDevice | The input device that triggered this axis movement |
| InKey | The name of the axis which moved. |
| InEvent | The key event that these args represent. |
| InEventTimestamp | The timestamp of when this input event was originally polled in the form of CPU cycles. |
|
inline |
|
inline |
Construct a FInputKeyEventArgs based on the old params of the ViewportClient InputAxis function.
| InViewport | The viewport which the axis movement is from. |
| InInputDevice | The input device that triggered this axis movement |
| InKey | The name of the axis which moved. |
| InDelta | The axis movement delta. |
| InDeltaTime | The time since the last axis update. |
| InNumSamples | The number of device samples that contributed to this Delta, useful for things like smoothing |
| InEventTimestamp | The timestamp of when this input event was originally polled in the form of CPU cycles. |
|
inline |
|
inline |
|
static |
| FPlatformUserId FInputKeyEventArgs::GetPlatformUser | ( | ) | const |
|
inline |
This may be true for non-gamepad FKeys if the input event is simulated input.
|
inline |
| float FInputKeyEventArgs::AmountDepressed |
The value that this input event represents.
For analog keys, the depression percent.
True if this input event originated from a touch surface.
Note: This may be set to true for simulated touch inputs from things like a mouse button.
| int32 FInputKeyEventArgs::ControllerId |
| float FInputKeyEventArgs::DeltaTime = 1.0f / 60.f |
The time between the previous frame and the current one
| EInputEvent FInputKeyEventArgs::Event = IE_MAX |
The type of event which occurred.
| uint64 FInputKeyEventArgs::EventTimestamp = 0u |
The timestamp of when this input event was originally polled.
This data should be set to be as representative as possible of the time of when the input event originated, most of the time from the raw Slate input event (FInputEvent) on the message handler.
This timestamp is in terms of CPU Cycles, gathered from the platform's high resolution clock via the FPlatformTime::Cycles64() function.
A timestamp value of 0u means that this event was not initalized with a valid timestamp
| FInputDeviceId FInputKeyEventArgs::InputDevice = INPUTDEVICEID_NONE |
The input device which this event originated from.
| FKey FInputKeyEventArgs::Key = {} |
The Key that this input event is for
| int32 FInputKeyEventArgs::NumSamples = 1 |
For analog key events. The number of samples of analog input which are contained in this events InputValue.
| FViewport* FInputKeyEventArgs::Viewport = nullptr |
The viewport from which this key event originated from.
This viewport may be null if this input event is from a simulated source, such as a unit test or a widget simulating player input.