Jump to content

Recommended Posts

Posted

hi:

I used virtual keyboard in textedit, I want to get keyboard event use GEVENT_GWIN_KEYBOARD, but this event isn't come. 

Can you help me ?

some code:

pe = geventEventWait(&gl, TIME_INFINITE);

.....

            case GEVENT_GWIN_KEYBOARD:
                gwinPrintf(ghConsole, "KEYSTATE: 0x%04X [ %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s]",........

 

Posted

Hello and welcome to the µGFX community!

Did you have a look at the virtual keyboard example that you can find in /demos/modules/gwin/keyboard? I am pretty sure that you're missing this line:

// We also want to listen to keyboard events from the virtual keyboard
geventAttachSource(&gl, gwinKeyboardGetEventSource(ghKeyboard), GLISTEN_KEYTRANSITIONS|GLISTEN_KEYUP);

 

Posted

yes!

thank you!

I add this line and use GEVENT_KEYBOARD event,  the program runs normally!

 

"geventAttachSource(&gl, gwinKeyboardGetEventSource(ghKeyboard), GLISTEN_KEYTRANSITIONS|GLISTEN_KEYUP);"

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...