Input & Keybindings

In this asset we use Enhanced Inputs to drive our input and key bindings. You can find all of the input actions and input mapping contexts in the Blueprints/Input/ folder. All of the keyboard and mouse key bindings can be found in the KeyboardMouse sub folder, and all of the gamepad related ones can be found in the Gamepad sub folder. The Shared folder contains input actions used by both devices.

We split the input mapping contexts up into multiple in this version so only keybindings related to activated systems are loaded. The Gamepad only keybindings (specific to each window) are only loaded if a gamepad is being used.

Gamepad Support

This asset does support gamepad. There are also a number of input actions that are only relevant to a gamepad. These input actions are loaded dynamically when the related window is opened.

In the previous version I had built a custom focus system and navigator, in this version we use the built in focus systems to drive it. This change was to reduce overhead and build a better foundation for those using Common UI (this system does not require common UI).

To help with gamepad I’ve also included input actions to change the focus window as well as reset the focus in the current window. See below for a full outline of all the input actions.

If you run into any issues related to gamepad focus please let me know.

Input Actions

Here is a breakdown of each input mapping context and its related input actions with the location of the event in parentheses and the default keybinding in brackets:

Shared Input Actions:

Blueprints/Inputs/Shared/ IMC_InventoryV4_Global:

IA_InventorySystem_ToggleInventory (UI_PlayerInventory)
I, Gamepad Right Shoulder

Toggle the player inventory window.

IA_InventorySystem_ToggleDebug (UI_PlayerInventory)
\

Toggle showing debug dynamic data while in the editor. Disabled in packaged games.

IA_InventorySystem_Modifier1 (UI_PlayerInventory)
SHIFT

The SHIFT button modifier.

IA_InventorySystem_Modifier2 (UI_PlayerInventory)
CTRL

The CTRL button modifier.

IA_InventorySystem_Modifier3 (UI_PlayerInventory)
ALT

The ALT button modifier.

IA_InventorySystem_HideAllWindows (UI_PlayerInventory)
ESC

Hides all open windows.

IA_InventorySystem_QuickTransfer (UI_PlayerInventory)
T

Transfer the hovered over item to a storage container.

IA_InventorySystem_QuickDrop (UI_PlayerInventory)
Shift

Drop the hovered over item into the world as a spawnable pickup item.

IA_InventorySystem_TakeAllFromStorage (UI_PlayerInventory)
G, Gamepad Face Button Top

Transfers all items from a remote storage that are not in specialty slots to the player inventory.

Blueprints/Inputs/Shared/ IMC_InventoryV4_Hotbar:

IA_Hotbar_NextSlot (UI_Hotbars)
Mouse Wheel Down, Gamepad D-pad Right

Selects the next slot on the hotbar.

IA_Hotbar_LastSlot (UI_Hotbars)
Mouse Wheel Up, Gamepad D-pad Left

Selects the last slot on the hotbar.

IA_Hotbar_UseItemInSelectedSlot (UI_Hotbars)
Left Mouse Button

Selects the last slot on the hotbar.

IA_Hotbar_TriggerSlot (UI_Hotbars)
1 through 0

The input action associated with each of our hotbar slot keybindings. The order of the inputs in the array, and the different Scalar X values is how we associate them to the hotbar slots. When pressed, if a usable item is in the slot the item will be used. If something else is in the slot the slot will be selected. The hotbar chapter will go over adding additional inputs for additional slots.

Blueprints/Inputs/Shared/ IMC_InventoryV4_Interact:

IA_InventorySystem_Interact (AC_Inventory_Interaction)
E, Gamepad Face Button Left

Interact with an interactable.

IA_InventorySystem_PickupAll (AC_Inventory_Interaction)
F, Hold Gamepad Face Button Left

Pick up all nearby item pickups.

Keyboard Only Input Actions:

Blueprints/Inputs/KeyboardMouse/ IMC_InventoryV4_KBM_Crafting:

IA_InventorySystem_TogglePlayerCraftingWindow (UI_PlayerCrafting)
V

Shows and hides the player’s crafting window.

Blueprints/Inputs/KeyboardMouse/ IMC_InventoryV4_KBM_Currency:

IA_InventorySystem_TogglePlayerCurrencyWindow (UI_PlayerCurrency)
X

Shows and hides the player’s currency window.

Blueprints/Inputs/KeyboardMouse/ IMC_InventoryV4_KBM_Equipment:

IA_InventorySystem_TogglePlayerEquipmentWindow (UI_TargetEquipment)
C

Shows and hides the player’s equipment window.

Gamepad Only Input Actions:

These gamepad only input actions are only loaded when the related window is open. For simplicity some gamepad input actions (like back and select) are shared amongst multiple gamepad specific input contexts. Since they are in multiple IMCs you have to define the input buttons for each use case.

Blueprints/Inputs/Gamepad/ IMC_InventoryV4_GP

IA_InventorySystem_GP_ChangeFocus (UI_InventorySystemHUD)
Gamepad Left Shoulder

If two windows are open at once, this input action switches the focus from one window to the other.

Blueprints/Inputs/Gamepad/ IMC_InventoryV4_GP_PlayerInventory

IA_InventorySystem_GP_Reset (UI_InventorySystemHUD)
Gamepad Left Trigger Axis

Reset the focus to the default location in the current window.

IA_InventorySystem_GP_Select (UI_Item)
Gamepad Face Button Bottom

If in move mode used to select the target destination. When not in move mode performs the default action depending on the item type.

IA_InventorySystem_GP_Use (UI_Item)
Hold Gamepad Face Button Bottom

Open the context menu for the currently selected item.

Blueprints/Inputs/Gamepad/ IMC_InventoryV4_GP_BuyableSlot_PurchaseWindow

IA_InventorySystem_GP_Back (UI_BuyableSlot_PurchaseModal)
Gamepad Face Button Right

Cancel buying a buyable slot and close the purchase modal.

IA_InventorySystem_GP_Select (UI_BuyableSlot_PurchaseModal)
Gamepad Face Button Bottom

Try and buy the buyable slot.

Blueprints/Inputs/Gamepad/ IMC_InventoryV4_GP_ContextMenu

IA_InventorySystem_GP_Back (UI_ContextMenu_Button)
Gamepad Face Button Right

Cancel and close the context menu.

IA_InventorySystem_GP_Select (UI_ContextMenu_Button)
Gamepad Face Button Bottom

Select the context menu option.

Blueprints/Inputs/Gamepad/ IMC_InventoryV4_GP_SplitStackWidget

IA_InventorySystem_GP_Back (UI_SplitWidget)
Gamepad Face Button Right

Cancel and close the split stack widget.

IA_InventorySystem_GP_Select (UI_SplitWidget)
Gamepad Face Button Bottom

Split the stack by the value of the amount.

IA_InventorySystem_GP_IncrementUp (UI_SplitWidget)
Gamepad Right Trigger Axis

Increases the value in the amount selector window.

IA_InventorySystem_GP_IncrementDown (UI_SplitWidget)
Gamepad Left Trigger Axis

Decreases the value in the amount selector window.

Blueprints/Inputs/Gamepad/ IMC_InventoryV4_GP_TargetEquipment

IA_InventorySystem_GP_Reset (UI_InventorySystemHUD)
Gamepad Left Trigger Axis

Reset the focus to the default location in the current window.

IA_InventorySystem_GP_Back (UI_TargetEquipment)
Gamepad Face Button Right

Close the equipment window.

Blueprints/Inputs/Gamepad/ IMC_InventoryV4_GP_TargetStorage

IA_InventorySystem_GP_Reset (UI_InventorySystemHUD)
Gamepad Left Trigger Axis

Reset the focus to the default location in the current window.

Blueprints/Inputs/Gamepad/ IMC_InventoryV4_GP_PlayerCrafting

IA_InventorySystem_GP_Reset (UI_InventorySystemHUD)
Gamepad Left Trigger Axis

Reset the focus to the default location in the current window.

IA_InventorySystem_GP_Select (UI_CraftingWindow_QueueItem)
Gamepad Face Button Bottom

Cancel the selected crafting queue item.

Blueprints/Inputs/Gamepad/ IMC_InventoryV4_GP_PlayerCurrencies

IA_InventorySystem_GP_Reset (UI_InventorySystemHUD)
Gamepad Left Trigger Axis

Reset the focus to the default location in the current window.

IA_InventorySystem_GP_Back (UI_PlayerCurrency)
Gamepad Face Button Right]

Closes the drop currency amount selector window.

IA_InventorySystem_GP_Currency_Drop (UI_PlayerCurrency)
Gamepad Face Button Top]

Show the drop currency amount selector window.

IA_InventorySystem_GP_IncrementUp (UI_PlayerCurrency)
Gamepad Right Trigger Axis

Increases the value in the amount selector window.

IA_InventorySystem_GP_IncrementDown (UI_PlayerCurrency)
Gamepad Left Trigger Axis

Decreases the value in the amount selector window.

Blueprints/Inputs/Gamepad/ IMC_InventoryV4_GP_Vendor

IA_InventorySystem_GP_Reset (UI_InventorySystemHUD)
Gamepad Left Trigger Axis

Reset the focus to the default location in the current window.

IA_InventorySystem_GP_VendorTab (UI_Vendor)
Gamepad Face Button Top

Switch vendor tabs.

IA_InventorySystem_GP_Select (UI_Vendor_Buy_Item & UI_Vendor_Sell_Item)
Gamepad Face Button Bottom

Buy or sell a selected item.

IA_InventorySystem_GP_IncrementUp (UI_VendorSell)
Gamepad Right Trigger Axis

Increases the value of the sell quantity incrementer.

IA_InventorySystem_GP_IncrementDown (UI_VendorSell)
Gamepad Left Trigger Axis

Decreases the value of the sell quantity incrementer.

Blueprints/Inputs/Gamepad/ IMC_InventoryV4_GP_WorkstationCrafting

IA_InventorySystem_GP_Reset (UI_InventorySystemHUD)
Gamepad Left Trigger Axis

Reset the focus to the default location in the current window.

IA_InventorySystem_GP_Select (UI_CraftingWindow_QueueItem)
Gamepad Face Button Bottom

Cancel the selected crafting queue item.