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