Page 1 of 1

Numpad Enter

Posted: 25 Feb 2022, 13:51
by Gosha
Hey!
We are using a UserControl with a Textbox and we have the logic for pressing Enter in the code behind.
It looks like this:
PreviewKeyDown() += [this](BaseComponent*, const Noesis::KeyEventArgs& e) {
        if (e.key == Noesis::Key::Key_Enter)
        {
            // logic
        }
Numpad enter doesn't trigger PreviewKeyDown and I don't see numpad enter in Noesis::Key enum.
Is there any solution for this?

Re: Numpad Enter

Posted: 25 Feb 2022, 15:28
by sfernandez
Hi,

Are you using our application framework? Or do you have your own integration implementing the window system?
I checked and Win32 is sending the VK_RETURN when pressing the numpad Enter key, and our Win32Display is mapping that to the Noesis::Key_Return (which is the same as Noesis::Key_Enter).

One thing you have to verify is that the focus is inside the UserControl, otherwise the PreviewKeyDown event won't reach it.