UWidgetInteractionComponent::PressKey

Press a key as if it had come from the keyboard.

Windows
MacOS
Linux

References

Module

UMG

Header

/Engine/Source/Runtime/UMG/Public/Components/WidgetInteractionComponent.h

Include

#include "Components/WidgetInteractionComponent.h"

Source

/Engine/Source/Runtime/UMG/Private/Components/WidgetInteractionComponent.cpp

Syntax

virtual bool PressKey
(
    FKey Key,
    bool bRepeat
)

Remarks

Press a key as if it had come from the keyboard. Avoid using this for 'a-z|A-Z', things like the Editable Textbox in Slate expect OnKeyChar to be called to signal a specific character being send to the widget. So for those cases you should use SendKeyChar.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss