dragonzhang Posted December 5, 2017 Report Share Posted December 5, 2017 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 More sharing options...
Joel Bodenmann Posted December 5, 2017 Report Share Posted December 5, 2017 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 More sharing options...
dragonzhang Posted December 6, 2017 Author Report Share Posted December 6, 2017 yes! thank you! I add this line and use GEVENT_KEYBOARD event, the program runs normally! "geventAttachSource(&gl, gwinKeyboardGetEventSource(ghKeyboard), GLISTEN_KEYTRANSITIONS|GLISTEN_KEYUP);" Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted December 6, 2017 Report Share Posted December 6, 2017 Glad to hear that everything is working Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now