Commit Graph

262 Commits

Author SHA1 Message Date
ben hoffman
94f9cb2070 Add the "Config" metadata to the bShouldOnlyTriggerLastActionInChord and bEnableDefaultMappingContexts so that they can be set in a config file as well as with a console variable.
#jira none
#rb trivial
#rnx

[CL 25798494 by ben hoffman in ue5-main branch]
2023-06-05 14:12:04 -04:00
ben hoffman
48fa690568 Deprecate the FPlayerMappableKeySlot and all its related functoins for 5.3, along with all the old player mapped key functions in favor of UEnhancedInputUserSettings
#jira UE-175936
#rb none
#preflight 6478cba80848b7126d3ec505

[CL 25733637 by ben hoffman in ue5-main branch]
2023-06-01 14:16:28 -04:00
ben hoffman
571c1ef58f Add an advanced setting on the Input Action for the input accumulation behavior. This setting would allow you to change an input action to cumulatively combine input from different Action Key Mappings instead of always accepting the mapping with the highest key value.
#jira UE-176016
#rb nate.strohmyer
#preflight 646bc2541b241f07481c0cf0

[CL 25644466 by ben hoffman in ue5-main branch]
2023-05-26 12:06:23 -04:00
ben hoffman
404712ecf7 Add EKeys::AnyKey support to Enhanced Input
#jira UE-167728
#rb trivial
#preflight 6467d374c571db717b881fe6

[CL 25602489 by ben hoffman in ue5-main branch]
2023-05-24 10:13:40 -04:00
ben hoffman
01d8eb0179 Check the Enhanced Action Mapping modifiers if there are none in the action instance cache for a given mapping. This fixes an issue where debug info about modifiers that are added via IMC assets would not show up when you use the "showdebug enhnacedinput" command.
#jira UE-166434
#rb trivial
#preflight 646cf7f72e78be98411d8b1a
#rnx

[CL 25592294 by ben hoffman in ue5-main branch]
2023-05-23 18:14:38 -04:00
ben hoffman
3cc4d6c89d Fix an issue where some key mappings would incorrectly be displayed as overriden in the "showdebug EnhancedInput" command. This was happening because the AddUnique call to the array would always add a new mapping, since it was comparing the instanced arrays of modifiers and triggers.
#jira UE-172276
#rb trivial
#preflight 6467d8668720894fb6bbf497

[CL 25564442 by ben hoffman in ue5-main branch]
2023-05-22 11:03:46 -04:00
ben hoffman
9df7e93824 Make the Enhanced Input behavior when input is flushed consistent with the legacy system.
This makes the behavior of Enhanced Input consistent with the Legacy input system when UPlayerInput::FlushPressedKeys is called (loss of focus to the viewport, or it is otherwise called from gameplay code).

Enhanced Input was incorrectly determing if a key was down on the previous frame if the input was flushed because its RawValue would be reset. We now check if the input is currently being flushed on this frame, and if it is then we can determine if the key was down on the previous frame based on it's "Value" in the key state map. If the "Value" is non-zero, but the "RawValue" has been reset to zero, we know it has been reset from the FlushPressedKeys function.

This behavior is Default ON, but can be toggled off in the Project Settings > Enhanced Input.

#jira UE-165730
#rb jodon.karlik
#preflight 6467858975696d2bd7de8254

[CL 25549173 by ben hoffman in ue5-main branch]
2023-05-19 14:44:45 -04:00
bryan sefcik
da92084a12 Optimized out more private modules includes and dependencies.
#preflight 64627c382965f6ea8ea83bd6

[CL 25479683 by bryan sefcik in ue5-main branch]
2023-05-15 16:26:12 -04:00
ben hoffman
03e7304ccd Add Continuous Input Injection to enhanced input. Before, if you called InjectInputForAction then it would need to be called every tick. A lot of games disable widget tick for perf reasons, so this gives an alternative!
#jira UE-185479
#preflight skip
#rb Phillip.Kavan

[FYI] Marius.Ursu

[CL 25438315 by ben hoffman in ue5-main branch]
2023-05-11 19:24:38 -04:00
mic rooney
34daf2c5d2 Missing include in previous change.
[FYI] [at]Michel.Champoux, [at]Ben.Hoffman
#preflight none

[CL 25417482 by mic rooney in ue5-main branch]
2023-05-10 17:30:30 -04:00
mic rooney
ae4da23c7f Updating enhanced input settings to allow deferral of settings updates.
[REVIEW] [at]Michel.Champoux
#preflight 645be118ab621cb7012cdb1e

[CL 25417449 by mic rooney in ue5-main branch]
2023-05-10 17:29:33 -04:00
ben hoffman
49ddb1d8f5 Mark all exec pins as advanced view on Input Action event nodes except for "Triggered". Most of the time the triggered event pin is what users should be connecting to, and making the other pins hidden will improve first time user UX and make it more obvious what pin you should be hooking up to.
There is an editor preference to change what pins show up by default in blueprints, but this change will hopefully point people towards using Input Triggers more instead of relying on undefined input behaviors and improve the first time user experience.

#jira UE-169056
#rb trivial
#preflight 645571d7d77a82d6a790be89

[CL 25395035 by ben hoffman in ue5-main branch]
2023-05-09 16:28:48 -04:00
ben hoffman
ade7c26f12 Remove dependency on InputBlueprintNodes from the InputEditor Module.
The Input Editor module has several features that are using the K2Nodes from enhanced input when it doesnt need to. The Blueprint Node logic should be kept in its own module.

This will allow the K2Nodes to actually read from editor settings and preferences in the rest of enhanced input, which would otherwise cause a circular depedency in the build graph.

This change is really just moving some functions from one module to another, neither module is publically exposed so no deprecation is required.

#rb trivial
#rnx
#preflight 645914ab4c3ec54e6e1070ec

[CL 25375925 by ben hoffman in ue5-main branch]
2023-05-08 15:46:28 -04:00
ben hoffman
2a55341ede Update tooltips/comments on Input Trigger states. Add a note about how to use Enhanced Input debug commands!
#jira UE-169056
#rb trivial
#rnx
#preflight skip

[CL 25375608 by ben hoffman in ue5-main branch]
2023-05-08 15:31:12 -04:00
ben hoffman
66afffe1c9 Allow blueprints to change the bConsumeInput flag on an Input Action at runtime
#jira UE-161061
#rb trivial
#rnx
#preflight skip

[CL 25363352 by ben hoffman in ue5-main branch]
2023-05-05 21:38:13 -04:00
ben hoffman
824216e522 Add a Slate Notification if you add an Input Action that already has mappings in it within an IMC
#jira UE-161462
#rb nate.strohmyer
#rnx
#preflight skip

[CL 25363342 by ben hoffman in ue5-main branch]
2023-05-05 21:37:23 -04:00
ben hoffman
de547b6925 When bIgnoreAllPressedKeysUntilRelease is true, don't only ignore key presses for keys that were in the previous key mappings, but for every key.
This fixes the situation where your key was not in a previous mapping context, but you still want this behavior.

For example:
1. You have an IMC with no key mappings to X
2. Your player presses and holds X
3. While they are holding X, you add an IMC with a mapping to X.
4. That input action should not trigger until the _next_ press of X.

#jira UE-156910
#preflight skip
#rb jodon.Karlik

[CL 25343918 by ben hoffman in ue5-main branch]
2023-05-04 18:10:15 -04:00
michel champoux
175e4c6c6b Made QueryPlayerMappedKeys and GetMappedKeysInRow's failed to find mapping log Verbose instead of Warning.
#rb [at]Ben.Hoffman

[CL 25327684 by michel champoux in ue5-main branch]
2023-05-03 18:05:52 -04:00
ben hoffman
69d1e10d40 Make the display name for getting the enhanced input user settings more explicit!
#jira UE-182138
#rb trivial
#rnx
#preflight skip

[CL 25309655 by ben hoffman in ue5-main branch]
2023-05-02 18:25:48 -04:00
DoubleDeez
36683495a9 PR #10403: Fix not being able to Copy & Paste the Mappings list in an Input Mapp? (Contributed by DoubleDeez)
#jira UE-184724
#rb me
#preflight skip

[CL 25309619 by DoubleDeez in ue5-main branch]
2023-05-02 18:24:17 -04:00
ben hoffman
4f75e6a7e7 Limit the length of a player mappable name to the max length of FName's to properly check for the max length.
#jira UE-181341
#rb jodon.karlik
#preflight skip

[CL 25309609 by ben hoffman in ue5-main branch]
2023-05-02 18:23:50 -04:00
jcb936
f62b2df3f2 PR #10070: Enhanced Input: Resetting the value of the action value bindings when the action is not present in the current mappings (Contributed by jcb936)
#jira UE-175863
#rb me
#preflight skip

[CL 25291653 by jcb936 in ue5-main branch]
2023-05-01 17:06:06 -04:00
mic rooney
0d7e2bc018 Fixing missing include
#preflight none

[CL 25285424 by mic rooney in ue5-main branch]
2023-05-01 12:45:11 -04:00
mic rooney
2f47c3ae3f Making input slots support enum ranges.
[REVIEW] [at]Michel.Champoux, [at]Ben.Hoffman
#preflight 644fcd5520749111212a8be2

[CL 25285118 by mic rooney in ue5-main branch]
2023-05-01 12:17:33 -04:00
yohann dossantos
8cb2e71dea - Fixed drag n drop issue with rows having expanded items.
=> code from CL 17423372 was disabling it explicitely, but I couldn't find any reason or have any repro. The comment talk about disabling between an item and its child, while with a EItemDropZone::BelowItem, it correspond to the bottom part of an item, and not the bottom item, so having the child item expanded or not won't change the drag n drop behavior.
- Fixed drag n drop issue for Input Mapping Context, where drag n dropping could give deterministic but incorrect result when more than 1 mapping exists for a group.
=> the reordering algorithm used requires that the content of the array is ordered by group, while it was not necessarily the case. Starting from this CL, it will (slower but safer algorithm).
- Prevent the drag n drop for Input Mapping Context between rows that are not part of the same parent node.


Tests:
-opened various Input Mapping Context from QA Game, like /Maps/Framework/EnhancedInput/EI_HelperAssets/Controls_3rdPerson/IMC_3rdPerson_Controls.uasset, that was failing 100% on some actions. Drag n dropped groups (collapsed or expanded), even on the last one, and on individual entries with 100% success. Did a lot of drag n drop test (between close elements, first and last, last and first, first and middle,...)
-tried to drag n drop across entries from different parent => it was blocked as expected.
-undo/redo after those operations.
-used drag n drop in other contexts (media play list, data table), no regression noticed when drag n dropping elements.

#jira UE-157906
#rb nate.strohmyer, karen.jirak
#preflight 644fd08e1c2846595c454ffa

[CL 25284259 by yohann dossantos in ue5-main branch]
2023-05-01 11:11:21 -04:00