I can’t bind the numpad ‘5’ key. In Project Settings → Input there is ‘Num 5’ key, but it works only when the NumLock is switched on.
But I need to bind the action to ‘Num 5’ with NumLock switched off.
I can’t bind the numpad ‘5’ key. In Project Settings → Input there is ‘Num 5’ key, but it works only when the NumLock is switched on.
But I need to bind the action to ‘Num 5’ with NumLock switched off.
Num 5 with NumLock switched off on most keyboards does nothing so you can’t bind it.
Hello Jacek,
Interesting case with the ‘5’ key here…
All the other Numpad keys you can hook up 2 keypress inputs. (7 / Home, 4 / ‘Left’ etc)
It’s like no input is being processed at all on a keyboard-level for Num 5
Maybe avoiding hooking up duplicate inputs to the num-pad would be the way to go, since I imagine that anyone expecting something to happen when they press a key on the numpad would immediately hit NumLock when nothing happens. (As opposed to thinking ‘My numlock is on the correct setting since all these other keys except 5 are working’)
But it has it’s key code and it is accessible from low-level.
I just need to bind ‘Num 5’ without NumLock enabled.
One more thing: this key can be captured in ‘UUserWidget::NativeOnPreviewKeyDown()’ function with KeyCode 12
Are you saying you’re able to see it triggered in C++ with numlock on and off?
I’d love to be proven wrong here, but my hypothesis is that our keyboards do not send any input for Num 5 when numlock is off.
Another way to visualize this is to use the console command showdebug input
An interesting quirk. Let me try casting a summoning spell
@Marc_Audy
Yes, I am. With Num Lock off to be precise.
You are wrong. Check 'UUserWidget::NativeOnPreviewKeyDown()’ function
Yes it has a keycode but it can be different keycodes on different keyboards as the key is not normally labelled. Numpad 5 is technically 2 keys in one and you can only guarantee that numpad 5 with NumLock on is Numpad 5.
I would not recommend using an unlabeled key that only might be keycode 12 [Clear] and it looks like Epic made it easy for you and assigned it as [None] so you wouldn’t use it.