UUserWidget::OnPreviewKeyDown

Called after a key (keyboard, controller, ...) is pressed when this widget or a child of this widget has focus If a widget handles this event, OnKeyDown will _not_ be passed to the focused widget.

Windows
MacOS
Linux

References

Module

UMG

Header

/Engine/Source/Runtime/UMG/Public/Blueprint/UserWidget.h

Include

#include "Blueprint/UserWidget.h"

Syntax

FEventReply OnPreviewKeyDown
(
    FGeometry MyGeometry,
    FKeyEvent InKeyEvent
)

Remarks

Called after a key (keyboard, controller, ...) is pressed when this widget or a child of this widget has focus If a widget handles this event, OnKeyDown will not be passed to the focused widget.

This event is primarily to allow parent widgets to consume an event before a child widget processes it and it should be used only when there is no better design alternative.

Returns

Returns whether the event was handled, along with other possible actions

Parameters

Parameter

Description

MyGeometry

The Geometry of the widget receiving the event

InKeyEvent

Key event

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