Gosha
Topic Author
Posts: 8
Joined: 27 Jul 2021, 16:06

Numpad Enter

25 Feb 2022, 13:51

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?
 
User avatar
sfernandez
Site Admin
Posts: 3363
Joined: 22 Dec 2011, 19:20

Re: Numpad Enter

25 Feb 2022, 15:28

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.

Who is online

Users browsing this forum: Bing [Bot] and 4 guests