nanogui: Difficulty Using GrInjectKeyboardEvent()
Subject:
Re: [nanogui] Difficulty Using GrInjectKeyboardEvent()
From:
"Greg Haerr" ####@####.####
Date:
27 Aug 2008 22:59:15 -0000
Message-Id: <089e01c90898$5b8f50e0$6501a8c0@winXP>
> GrInjectKeyboardEvent(GR_ROOT_WINDOW_ID, MWKEY_SYSREQ, 0, 0, GR_TRUE);
Take a close look at the code in nanox/srvevent.c::GsDeliverKeyboardEvent,
you'll see that there are issues with whether the mouse is in the window,
and focus issues that may cause the event to be discarded.
> Finally, is there another way to post events to the queue is
GrInjectKeyboardEvent() does not work the way I think it should?
There's no way currently to post arbitrary events to the queue.
Mouse events can be generated with GrInjectPointerEvent.
If you want arbitrary events, you'll probably have to call
something like nanox/srvevent.c::GsDeliverGeneralEvent(),
which isn't meant to be called by applications but is accessible
when LINK_APP_INTO_SERVER.
Regards,
Greg