Jump to content

how to get virtual keyboard event?


dragonzhang

Recommended Posts

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]",........

 

Link to comment
Share on other sites

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);

 

Link to comment
Share on other sites

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...