Input Action Key Image
This widget allows you to display the image of the Key from the selected Input Action
and the image's Brush Texture
can't be set manually
Create a Input Action Key Image
-
First, create a
User Widget Blueprint
-
Inside the
User Widget Blueprint
, Create a Input Action Key Image
Input Action Key Image Properties
-
Input Action
The
Input Action
whose mapped key's texture image will be shown.
-
Input Mapping Context
The
Input Mapping Context
where theInput Action
is defined. This is used to show the respective key's texture image.
-
Input Keys Data
The data asset containing textures for all
Input Keys
. If none is provided, create a data asset of type Input Keys Data.
-
Input Key Textures
Displays the textures of the keys mapped to the selected
Input Action
in theInput Mapping Context
. Only shows the texture of the currently selectedInput Device
keys.
-
Selected Input Key Texture Index
The index of the texture to display from the
Input Key Textures
array. When the input device is set toKeyboard & Mouse
, this setsKeyboard Mouse Input Key Image Index
, and similarly forGamepad
whose value is set byGamepad Input Key Image Index
.The index for both devices must be changed separately if the
Input Action
orInput Mapping Context
is changed.
-
Input Device
The
Input Device
used to change the texture for each device. This is a cosmetic setting and cannot change at runtime except through internal methods that detect the currentInput Device
.This helps the developer visualize the preferred key's texture in the editor.
-
Is Selected Input Device Only
If true, only shows the key texture for the
Input Device
selected in the editor.If false, the
Input Device
will change at runtime based on the device currently used by the player.