we can find some pre-defined non-axis/axis keys as FName in GenericApplication.cpp. they are for mapping from various input messages to generic input messages. “various input messages” means, there are many types of gamepad in the world. the button/stick layout differs in Xbox One controller, Playstation 4 controller and so on. the gamepads below are Xbox One, Playstation 4, Stadia and Switch in order.
look at the Xbox One one and Playstation 4 one. they have many differences such as position of stick and exsitance of touch pad. even in comparison for Xbox One one and Switch one, the number of buttons differs. in this situation, it is not easy for every individual developer to support every type of gamepad, so the need of generic mapping for gamepad input arises. let us find out the generic mapping with Xbox One controller examples.
the tables are from the reference #1. you can find more details for each button/stick at the URL. though there are so many items in table, some of them are not counted as user input in common situation. so, we can gotta consider the items below:
Index
Item Name
Unreal Mapping
Input Type
1
Left Stick
(Move Horizontally) Gamepad_LeftX
Key, Axis
(Move Vertically) Gamepad_LeftY
Key, Axis
(Move Left Side More Than Deadzone) Gamepad_LeftStick_Left
Key
(Move Up Side More Than Deadzone) Gamepad_LeftStick_Up
Key
(Move Right Side More Than Deadzone) Gamepad_LeftStick_Up
Key
(Move Down Side More Than Deadzone) Gamepad_LeftStick_Down
Key
(Click) Gamepad_LeftThumbstick
Key
2
Left Bumper
Gamepad_LeftShoulder
Key
3
View Button
Gamepad_Special_Left
Key
6
Menu Button
Gamepad_Special_Right
Key
7
Right Bumper
Gamepad_RightShoulder
Key
8
Directional Pad
(Left) Gamepad_DPad_Left
Key
(Up) Gamepad_DPad_Up
Key
(Right) Gamepad_DPad_Right
Key
(Down) Gamepad_DPad_Down
Key
10
Right Stick
(Move Horizontally) Gamepad_RightX
Key, Axis
(Move Vertically) Gamepad_RightY
Key, Axis
(Move Left Side More Than Deadzone) Gamepad_RightStick_Left
Key
(Move Up Side More Than Deadzone) Gamepad_RightStick_Up
Key
(Move Right Side More Than Deadzone) Gamepad_RightStick_Up
Key
(Move Down Side More Than Deadzone) Gamepad_RightStick_Down
Key
(Click) Gamepad_RightThumbstick
Key
11
Right Trigger
Gamepad_RightTriggerAxis
Key, Axis
(Press More Than Deadzone) Gamepad_RightTrigger
Key
14
Left Trigger
Gamepad_LeftTriggerAxis
Key, Axis
(Press More Than Deadzone) Gamepad_LeftTrigger
Key
X
X Button
Gamepad_FaceButton_Left
Key
Y
Y Button
Gamepad_FaceButton_Up
Key
A
A Button
Gamepad_FaceButton_Bottom
Key
B
B Button
Gamepad_FaceButton_Right
Key
some of them are handled as not only Key but Axis, too.
the Gamepad_LeftY is the one of cases
Gamepad Non-Axis Input Handling Process
focus the function XInputInterface::SendControllerEvents(). there is the logic to filter hardware input state.
in this case, OnControllerAnalog() is called even a tiny change of input value exists. because the code compares with OldAxisValue != NewAxisValue. the function will not be called only when there is no change on input value.