[Full Project] 's UMG Rebindable Key System, Rebind keys at Runtime!

Ah my bad. I had to set the IsFocusable flag on the Main_ByRama blueprint.

Hi guys! I am new here and almost newbie in UED4 (I had the experience in the first and second UED at the time, but then abandoned it and forgot almost everything). I started my project a month ago and are actively trying to learn Blueprints. Decided started with the Menu, because whatā€™s a game without the menu?:slight_smile: I did almost all menu options, except for remapping of control buttons on the keyboard and the mouse. Because in the editor thereā€™s no way to create menu buttons remapping for a knowledgeable C++ personā€¦ I am greatly surprised by the fact that Epic is still not included in UEDā€™s official system of key mapping. Itā€™s like having an expensive car, but without a rudder. How is this even possible? They position the engine and editor as a tool for creating games from scratch, which can be dealt with by a person who knows nothing in programming. But what about remapping the keys? How can I do this without knowing anything in programming? Why still no Blueprints for this? Searching online, I noticed that a lot of people face this problem. If you do not have a programmer in your team (iā€™m in my ā€œteamā€ alone) - you can forget about the redefinable keys at your own game?
I found VictoryPlugin from (and it led me here), installed it but do not understand how can I use it - never found the guide. Also I installedā€™s Example project called ReBindableKeys, but as a newbie I still canā€™t understand how can I use it. Wherever I found any explanation - still all we are talking about programmingā€¦ Also I tried to installā€™s plugin called VictoryEdEngine, but I am not able to make it work in the editor. It says that the engine version is not compatible with the version of the plugin and asks to compile the plugin. The great irony! All my attempts to find a more recent version of this plugin has come to nothing - I now have the most recent version. Guys, please help! Donā€™t let me die a budding game designer!
Without remapping keys, I donā€™t even want to think about continuing to work. Iā€™m not using WASD, and understood how much it hurts to not play on your desired keys and unable to reassign them. It will just be a huge shame for me to release the game with such a flaw. What do I do? Is there a solution in my case? Iā€™m too old to learn programming and choose UE4 because of the fact that here you donā€™t need to be a programmer. But ran into a dead end so sadā€¦ Can anyone tell where can I find a manual for a Blueprint for create a system of key mapping without programming? Does it even possible? Or my only option is to buy any ready plugin for that? Many thanks in advance for any help! And please forgive me for my bad English:)

First off, when you say ā€œIā€™m not using WASD, and understood how much it hurts to not play on your desired keys and unable to reassign them.ā€ I am assuming this is in game controls, not editor controls. These can be manually remapped under Input in Project Settings; however, you cannot change this during runtime, without the plugin, which I will now explain.

I am going to assume you are using UMG from your menu, what youā€™re going to want to do is, create a button that when clicked on, creates the widget Main by, this is all you need to do, the plugin will do the rest; however, you must first have added Inputs under Projects Settings, or nothing will show up. You will also need to add a button to remove or collapse the widget, it should save the bindings by itself.

There is currently no way to rebind Inputs in blueprints :slight_smile: you must use programming, orā€™s Plugin. You do not needā€™s Engine, it comes with a lot of extra stuff, like custom functions and macros. As for the Engine version not being compatible, is that for the VictoryEngine or the Plugin, and are you using Unreal Version 4.11? (That just came out, so most likely has not updated the Plugin or the Enigne) You will need to use an older version of Unreal, or wait for to update. If you are already extensively using 4.11, I can tell to update the plugin, but I donā€™t know how fast he will be able doing that, since he is quite busy :).

If you need more help on how to use the plugin, just ask and I shall make a more detailed explanation!

Thank you, gmc!!! Of course i am saying about to change keybindings during runtime so other players can change them too. There were some days since my first post and i am was learned more:) But for keybinds and using for that - too difficult way in current situation with that plugin. I choosed to buy already done one from Market (for 25 bucks) and now concentrating on other menus whicj i can do myself and of after watching tutorials. The most difficult of them was Brightness - i found no other way except playing with ā€œGammaā€ command:)
Thanks you again for support!

np, and as for the brightness, you might be able to put a post process volume in your level and unbound it, then set the auto exposure level in your menu using BPs (higher = brighter)! But you would have to make sure each level has the volume (if you have different levels)

ā€œGammaā€ command works fine. It has 6 stages of brightness (0-5, 2 is default) and this is pretty enough for me.

Iā€™m having issues with the alphabetical ordering thing too.

Is there a way to rebind a key on a specific index of the Axis/Action input by modifying the C++ function?

justhtiskey.PNG Just this key for example

Or does anyone have a way to bind on the same axis a keyboard key and a gamepad key ?

I may have fix my problem, iā€™m sharing here two new function i made to add in your VictoryBPLibrary, they allow you to add axis and action input:

For the Axis :
to add in Header :


UFUNCTION(BlueprintCallable, Category = "Victory Library | Key Rebinding")
		static void AddInputAxis(FName AxisNameToAdd, FKey NewAxisKey, float AxisScale);

and in the cpp :

void UVictoryBPFunctionLibrary::AddInputAxis(FName AxisToAdd, FKey NewAxisKey)
{
	UInputSettings* Settings = GetMutableDefault<UInputSettings>();
	if (!Settings)return;
	FInputAxisKeyMapping AxisAdd = AxisAdd.AxisName = AxisNameToAdd;
	AxisAdd.Key = NewAxisKey;
	AxisAdd.Scale = AxisScale;

	TArray<FInputAxisKeyMapping>&Axi = Settings->AxisMappings;
	Axi.Add(AxisAdd);
	for (TObjectIterator<UPlayerInput> It; It; ++It)
	{
		It->ForceRebuildingKeyMaps(true);
	}
}

For the Action :

Header :


UFUNCTION(BlueprintCallable, Category = "Key Rebinding")
		static void AddInputAction(FName ActionNameToAdd, FKey NewActionKey);


cpp :


void UVictoryBPFunctionLibrary::AddInputAction(FName ActionNameToAdd, FKey NewActionKey)
{
	UInputSettings* Settings = GetMutableDefault<UInputSettings>();
	if (!Settings)return;


	FInputActionKeyMapping ActionAdd = ActionAdd.ActionName = ActionNameToAdd;
	ActionAdd.Key = NewActionKey;

	TArray<FInputActionKeyMapping>&Actio = Settings->ActionMappings;
	Actio.Add(ActionAdd);
	for (TObjectIterator<UPlayerInput> It; It; ++It)
	{
		It->ForceRebuildingKeyMaps(true);
	}


}

Hi ! Great job with your plugin :slight_smile: But I got a problem. Why I canā€™t have axis and action bindings in the same widget ? When I put them into the same widget via Wrap Box or Widget Switcher, I can only change action key bindings and axis donā€™t respond to my key pressing. If someone know how to fix, it let me know :o

Thanks for this, awesome job. I have a quick question. On my axis mappings, it dies not pick up the axis, for example, when i set my forward axis, its just gamepad thumb-stick left Up, not the axis. So if i move it down, it picks up : gamepad thumb-stick left down, not gamepad thumb-stick Axis. Any ideas where I am going wrong?

Thanks, Shaun :slight_smile:

, this is great!

Couple things though - your RemoveAxis/RemoveAction functions donā€™t account for the fact a single key might be bound to several axes/actions and we might want to remove the bindings only on axes/actions specified in struct passed to function. And you really should integrate those AddAxis/AddAction nodes - the whole thing is incomplete without them.

Any of making the keybind system independant from victory plugin?. Ty

your download is 4.10, will this update cleanly to 4.12?

Two questions:

  1. Will this work in 4.13/4.14?

  2. Why in the world hasnā€™t Epic implemented this kind of functionality in the engine itself??? Madness!

Key Rebinding 4.15

Dear Community,

Iā€™ve updated my Key Rebinding full project to 4.15 for oyu!

I include the relevant version of Victory Plugin now, so I am using media fire instead of the wiki:

Wiki Download Page ( prior versions )

Direct Link:

Enjoooy!

:heart:

Hey

Thanks for your project but I have some problems. I canā€™t set the new key to be a gamepad key or axis. Any way to change that? ^^

And there is no Deprecated Set Input mode UI only :confused:

Dear, how difficult it would be to create ā€œdefault input settingsā€ button? In case of user doesnā€™t want to rebind each button manualy to its default value.

Thank you for your hardwork.

Check out CardinalMenu https://forums.unrealengine.com/showthread.php?121203-Community-Project-Blueprints-Cardinal-Menu-System-Steam-and-LAN-Server-Browser-w-Friends-List

The menu system has gotten a bit complicated, but it works. You can modify CardinalMenuā€™s Set Default Input method and use it in your own game.