x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

[Closed] Key mapping: Revert to Default Keys

I'm trying to figure out the right way to implement a "Revert to Defaults" feature in my "change key mappings"-UI. I found and read [this post][1], but I am still not sure what the right approach for this is.

I notice there are already two input config files, one Input.ini located in the Save folder and the DefaultInput.ini. With the system I have set up now (when playing in the editor) it looks like the Input.ini is the only one changing when I remap keys. Would it be possible to load the keys set in DefaultInput.ini and use these as defaults?

Have a great day!

Product Version: Not Selected
Tags:
more ▼

asked Dec 30 '16 at 08:43 PM in Using UE4

avatar image

Answers.Archive STAFF
1.9k 208 316 688

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

The question has been closed Dec 30 '16 at 08:45 PM by AndrewHurley for the following reason:

The question is answered, right answer was accepted


1 answer: sort voted first

In general we don't recommend modifying the input settings directly for remapping. I'm copy/pasting a response I made on a similar question that was marked private that is basically about the same issue:

The approach that Fortnite has taken and I believe is probably a reasonable model is to use the Project Settings as your defaults. Then within your game's saved user settings store a list of modified input settings.

Whenever a setting is changed or the Player Controller initializes its input system, the modified settings are applied to the Player Input object such that the old mappings are removed and the new mappings added. To reset to defaults simply throw away the user's modified bindings list.

It is always important to remember to call ForceRebuildingKeyMaps on the PlayerInput after any changes are made to its view of the Action or Axis Bindings.

more ▼

answered Dec 30 '16 at 08:43 PM

avatar image

Answers.Archive STAFF
1.9k 208 316 688

avatar image Answers.Archive STAFF Dec 30 '16 at 08:43 PM

Curiosity, why don't you recommend modifying the input settings?

The default Input settings sure, but the input ones I don't understand why.

Since everything seems to work around input settings.

avatar image Answers.Archive STAFF Dec 30 '16 at 08:43 PM

Primarily for 2 reasons:

1) We think of the input settings as the defaults. As you've found if you manipulate those values, the ini settings that go in to the Saved folder make it difficult to revert back to defaults.

2) If you manipulated the input settings directly it would make having separate configurations for different users difficult.

avatar image Answers.Archive STAFF Dec 30 '16 at 08:43 PM

Ok. We thought DefaultInput to be the defaults

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question