Yes, I mean binding. Am using 4.9.2, but changed a lot as I wanted my set up way different than 's example that just pulls what is there. So my ‘window’ looks like this:
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.
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 has Set Keyboard Focus! (I set this in my Element by 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), 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 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…
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.
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.
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 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 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’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. 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 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’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, 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
That worked! However, for some reason, if I deleted the intermediate folder itself, it gave me an error, so I just deleted everything inside
Now its only ~100mb!
Thanks!