[SOLVED] "Input key selector" does not take the mouse wheel

Good day’s time!

Let me describe a problem: I’ve created a “Menu” widget, which has an ability to bind buttons for action or axis; I use an “Input key selector” for this, which is situated inside the “Scroll box”. And all things would be nice, except one: an “Input key selector” doesn’t want to receive neither “Mouse Wheel Up”, nor “Mouse Wheel Down” as a button’s bindings. What can it suppose to be? Is it a bug, or is it just me? Do I need to solve this problem by myself, or it’s an UE4.18.3 issue, and all I need - is to update it to more fresh version?

P.S.: Trying to do this with the Blueprint system.

UPDATE:

Still an issue in UE4.22.3.

Thank you!

Still an issue in 4.22.

Input Key Selector completely ignores Mouse Wheel Up/Down actions.

Gratch, seems to me, you misunderstood the situation. I didn’t tell that mouse input not working, I tell that “Input key selector” cannot receive any of “Up/Down” bindings. Read carefully, give me a favour.
However, if you think that I’m wrong, so, please, bring here your BP example.

I misunderstood. I looked into it. You’re right. Input Key Selector does not respond to mouse wheel input. Odd. Must be an oversight. I borrowed some code from [Mathew Wadstein][1] and came up with a work-around. It’s based on the idea that we’re not going to be using all our keys in-game. So, pick two unused keys and remap (intercept) them to your mouse wheel buttons during the OnSelectKey event.

285916-renameinputkeyselector.jpg

I misunderstood the question, originally. I looked into it. You’re right. Input Key Selector does not respond to mouse wheel input. Odd. Must be an oversight. I borrowed some code from [Mathew Wadstein][1] and came up with a work-around. It’s based on the idea that we’re not going to be using all our keys in-game. So, pick two unused keys and remap (intercept) them to your mouse wheel buttons during the OnSelectKey event.

Mouse wheel key binding is working in 4.22.1. If it’s not working in your project, then you have to hunt down every single one of its event calls. As far as I know, it can only be used once. The first blueprint that calls a mouse wheel event will consume it, and it will not work anywhere else. Choose the placement of your ONE mouse wheel call wisely. I suggest placing it in either your character’s blueprint or its controller. Then, from there, you can add an event dispatch that’s triggered by the mouse wheel event. Next, go to any other blueprint needing a mouse wheel event. From there, cast back to your char’s bp (preferably on event-begin-play), and bind its event dispatch to the this other bp’s triggering event which requires the mouse wheel input.

Yes, I’ve already saw a Wadstein’s videos, and this video wasn’t an exception. The problem in this case is that you hard-coded a “Mouse Wheel”, but this is not a solution; the “seed of evil” is when you try to bind a MW via widget interface, an “Input Key Selector” will completely ignore all your attempts to do it.
This bug(?) does a really headache for mass of people, unfortunately. And neither me, nor anybody propose an universal solution, as far as I know.

Finally, I’ve found out, how to do it via BP only! It’s not so easy, but it works now, so IKS gets and sets Mouse Wheels very well without any problems. Problem solved.

Please post a screenshot of your BP solution.

Would you mind explaining how you solved this?

I disagree. The mouse wheel is not “hard-coded.” It’s bound to two unused keys * and - on the numpad in this case, but you can use whatever unused keys you want. Just pick them from the drop-down menu at the “Make InputActionKeyMapping” node. You would also have to inform the user of these keys. Then, when you press the * key from within the HUD in-game the InputKeySelector will see it as the MouseWheelUp key and bind it accordingly. Here, I bound it to Jump, so when I hit MouseWheelUp, my character jumps. But, you could bind it to whatever you want. Just make sure to rename the InputKeySelector to the corresponding action (jump, attack, walk, sprint, whatever), because the script takes that name and matches it with the ActionMappings in your project settings.

Wow, the syntax and features on this website are driving me f-ing nuts. I can’t edit posts and I can’t delete them, and now I realize how bad a choice the “*” was for this example. It’s the multiplication sign from the numpad. That’s what I bound MouseWheelUp to.

Why are you use even bothering to post if you’re not going to provide an answer?

2 Likes