My OpenGL keyboard event can't work

I use Motif for my project human interface and OpenGL to display my graphics. The following callback will generate the mouse and keyboard event. But the function “inputCB” can only receive the mouse event, and the keyboard event can’t switch from Motif button to drawing area widget (canvas). So if I press any key, the button callback will work instead of key event.

Does anyone know how to change the focus from a button to my opengl drawing area canvas?

Callback funtion for mouse and key event:

XtAddCallback(canvas, GLwNinputCallback, inputCB, NULL);

I think you would have more luck getting an usable answer when asking this on a forum or mailinglist about Motif.

[This message has been edited by richardve (edited 04-08-2003).]

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.