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:
Toggle the player inventory window.
Toggle showing debug dynamic data while in the editor. Disabled in packaged games.
The SHIFT button modifier.
The CTRL button modifier.
The ALT button modifier.
Hides all open windows.
Transfer the hovered over item to a storage container.
Drop the hovered over item into the world as a spawnable pickup item.
Transfers all items from a remote storage that are not in specialty slots to the player inventory.
Blueprints/Inputs/Shared/ IMC_InventoryV4_Hotbar:
Selects the next slot on the hotbar.
Selects the last slot on the hotbar.
Selects the last slot on the hotbar.
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:
Interact with an interactable.
Pick up all nearby item pickups.
Keyboard Only Input Actions:
Blueprints/Inputs/KeyboardMouse/ IMC_InventoryV4_KBM_Crafting:
Shows and hides the player’s crafting window.
Blueprints/Inputs/KeyboardMouse/ IMC_InventoryV4_KBM_Currency:
Shows and hides the player’s currency window.
Blueprints/Inputs/KeyboardMouse/ IMC_InventoryV4_KBM_Equipment:
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
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
Reset the focus to the default location in the current window.
If in move mode used to select the target destination. When not in move mode performs the default action depending on the item type.
Open the context menu for the currently selected item.
Blueprints/Inputs/Gamepad/ IMC_InventoryV4_GP_BuyableSlot_PurchaseWindow
Cancel buying a buyable slot and close the purchase modal.
Try and buy the buyable slot.
Blueprints/Inputs/Gamepad/ IMC_InventoryV4_GP_ContextMenu
Cancel and close the context menu.
Select the context menu option.
Blueprints/Inputs/Gamepad/ IMC_InventoryV4_GP_SplitStackWidget
Cancel and close the split stack widget.
Split the stack by the value of the amount.
Increases the value in the amount selector window.
Decreases the value in the amount selector window.
Blueprints/Inputs/Gamepad/ IMC_InventoryV4_GP_TargetEquipment
Reset the focus to the default location in the current window.
Close the equipment window.
Blueprints/Inputs/Gamepad/ IMC_InventoryV4_GP_TargetStorage
Reset the focus to the default location in the current window.
Blueprints/Inputs/Gamepad/ IMC_InventoryV4_GP_PlayerCrafting
Reset the focus to the default location in the current window.
Cancel the selected crafting queue item.
Blueprints/Inputs/Gamepad/ IMC_InventoryV4_GP_PlayerCurrencies
Reset the focus to the default location in the current window.
Closes the drop currency amount selector window.
Show the drop currency amount selector window.
Increases the value in the amount selector window.
Decreases the value in the amount selector window.
Blueprints/Inputs/Gamepad/ IMC_InventoryV4_GP_Vendor
Reset the focus to the default location in the current window.
Switch vendor tabs.
Buy or sell a selected item.
Increases the value of the sell quantity incrementer.
Decreases the value of the sell quantity incrementer.
Blueprints/Inputs/Gamepad/ IMC_InventoryV4_GP_WorkstationCrafting
Reset the focus to the default location in the current window.
Cancel the selected crafting queue item.