Download

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

Yes, I mean binding. Am using 4.9.2, but changed a lot as I wanted my set up way different than Rama’s example that just pulls what is there. So my ‘window’ looks like this:

My onkeydown for action input (similar to for axis input):

0101cc41c4127997ad2d67e874aa1a244e7c4194.png

I added the print so it prints the key as text with ]'s around it, works for all keyboard stuff, but not the space, nothing prints at all… the button you are on simply toggles color like it has been selected when you hit space.

For my OnMouseButtonDown for action input:

db4d451ffedc3dc16236e140942cd2170c716d62.png

The printstring there shows ‘right mouse button’ and ‘middle mouse button’ and mouse button 2 and 3 … but no left mouse button. Like the space, it just acts like the button was hit again rather than getting the input.

Ok, I set up my bp and was able to set Space and LMB. Two quick things, for LMB, when trying to set it you have to click off of the button; for space, make sure your Main by Rama has Set Keyboard Focus! (I set this in my Element by Rama when the button is clicked) If you are doing that, the only thing different from mine to yours is that you have the Key TXT and Old VIC Key and Victory Action Key variables, while I am getting these straight from the Widget (Element by Rama), I don’t know if that really matters, but try getting/setting them straight from the widget and see if it then works. If that still does not work, then I have no other idea other than something is eating your Space and LMB (like when you click on the button trying to set the binding to LMB)

I am not using element by rama or his BP’s … so my key txt and victoryactionkey are direct from the blueprint. I have a MM_Controls which contains the scroll box, and create axis and action widgets in it based on what inputs are set up.

I had the SetKeyboardFocus to MM_Controls, when I changed it to a reference to self the space bar now comes out right. But still missing the left mouse button, and I see no ‘set mouse focus’ to set to that widget as well. Hmm…

I will keep trying some things… Thanks.

Got it. When a button is clicked, I set ‘Is Enabled’ to false, then at the end of onmouse and onkey, reenable it. Now it captures the left mouse button fine. Now if up and down mouse wheel didn’t return ‘none’ … lol. thanks again.

I’m glad you got everything working! As for the mouse wheel, I actually do not have that working either! If you have not figured it out by tomorrow, I’ll take a look at it!

The problem with the mouse wheel is ‘KeyGetDisplayName’ returns ‘NONE’ for it, no matter if it rolls up or down. I put something in Answer Hub about it, but I hardly ever see Epic address things put there.

I finally added all the stuff I did to the Wiki tutorial (and my Blog)… this is my setup:

Ok, I have the Mouse Wheel Working, you can’t get the key, so you have to use the Mouse Wheel Delta to determine if its up/down. And I think your already using this, but for anyone reading this, to get when you use the Wheel, you have to get the Override OnMouseWheel.
6af946fcd2963d4d06e5b5e66616ffd88cf03034.jpeg

Nice work, clever. Having trouble figuring out what you set the pin type to in the second one to get it to have the mouse key pair as output.

Nevermind, it is type Key.

Thank you for helping people out in my thread gmc!

Much appreciated!

:slight_smile:

Rama

Anytime! Especially since the question was about one of my posts! I’m always available to help if anyone needs it! (As long as it’s BP only :D)

Quick question i hope! I used your rebinding library, which works very well. I am having issues with combinations of keys in a mapping though, such as CTRL + F etc… It does work in your example, but my key down event already gets triggered before i can press anything besides CTRL… It does work if i press the keys before i press the rebind button… Do you have anything special configured in your example project that i should know of? I am on version 4.8.3 by the way. I already tried using GetInputKeyTimeDown to give it time to get the additional keys as well, which i check in the keydown event, but it doesn’t get triggered often enough which makes the time for binding way too long.

Thanks for any help!

If I’m reading this correctly, you’re trying to get a double binding right? (IE. RMB + G,) Or are you just trying to get CTRL, SHIFT, ALT, or CMD with a separate button? (G + ALT) If it’s the second, there are separate buttons you click to get those (to the right of the binding) As for the first, I don’t know if you can do a double binding (at least I can’t with my setup since I can only have one Key for the Make VictoryInput and there is no Append or anything to combine multiple Keys); although it sounds like you have it working sometimes

Mind posting, and I’ll see if I can fix it in BPs, or we may need Rama to re-code the Input to allow multiple keys/add a way to combine Keys! (Which I don’t even know if that’s possible since in the Project Settings, you’re only allowed to have one Key, unless I’m missing something!)

If Im reading this correctly, you’re trying to get a double binding right? (IE. RMB + G,) Or are you just trying to get CTRL, SHIFT, ALT, or CMD with a separate button? (G + ALT) If it’s the second, there are separate buttons you click to get those (to the right of the binding) As for the first, I don’t know if you can do a double binding (at least I can’t with my setup since I can only have one Key for the Make VictoryInput and there is no Append or anything to combine multiple Keys); although it sounds like you have it working sometimes

Mind posting, and I’ll see if I can fix it in BPs, or we may need Rama to re-code the Input to allow multiple keys/add a way to combine Keys!

I am only looking into combinations of CTRL, SHIFT, ALT, or CMD and another key, which is supported by Rama’s plugin. Note: you can push the button and press CTRL + F and it correctly marks the keybinding as being CTRL + F, no need for doing checking the checkbox. Somehow every UMG example i make myself doesn’t work as explained above. It suspect it has to do with the way combinations of keys are handled by UE4

I think i found out what is the problem with my code compared that of Rama. He keeps the binding widget active after the initial key press until you either close the menu or try to bind another key. This ensures that if i press ctrl + F it might not be registered correctly the first event, but afterwards its recognized. Its kind of lame that UE4 doesn’t recognize the combination keys within menu’s though and i now have to build in some delay to give the user the chance to press a combination instead.

Update: i now have added a 0.5 second delay when ctrl, alt, shift or cmd is pressed to register a possible combination instead… Afterwards you have to reclick the button again if you want to rebind again, in Rama’s implementation you can keep rebinding, but i don’t like this since you have to be able to navigate through my menu using keyboard/controllers as well.

Hey Rama, would you mind upgrading this? The full Victory Plugin is ~956mb compared to ~1.9MB with the bindings by them self, so it would save a lot of space for people only using the Bindings, like my self :slight_smile:

My original project uses my Victory plugin though :slight_smile:

The solution is to delete the intermediate folder of the plugin if you find the size of the plugin suddenly jumped. Intermediate is often about 1 GB

But if you package and get an error, and have VS, you should do a full recompile of the plugin only during packaging phase.

Or if you dont have VS, you can use my packaged binaries from the wiki or my media fire version.

:slight_smile:

Rama
I

That worked! However, for some reason, if I deleted the intermediate folder itself, it gave me an error, so I just deleted everything inside :slight_smile:
Now its only ~100mb!
Thanks Rama!

You’re welcome gmc!

Whoa that’s a neat idea, to not delete the Intermediate folder itself, thanks for letting me know!

:slight_smile:

Rama

4.10 Upgrade completed, Action and Axis Mappings Are Both Supported!

Dear Community,

I’ve upgraded my Rebindable Keys UMG system (which uses my Victory Plugin) to 4.10!

Here’s the download link so you can get the version that is right for you!

**Wiki Download Link **


**Video**


https://www.youtube.com/watch?v=Hj969IfWhVc


Axis Mappings

78e4afd1f68c16c666acb4a5fe6badb7773ab16f.jpeg


**Action Mappings**

![4b996f7710fbd5c76274a9a62eda2d72df9776b9.jpeg|1280x960](upload://aMMxJEx5JIhK597MhCvxRiIV05b.jpeg)

The Nodes

8ecc5dd055a307c7df41b32c70e56ddba193b6f4.jpeg


Have fun today!

♥

Rama