[Iup-users] Matrix -- responding to key presses?
Jeremy Cowgar
jeremy at cowgar.com
Tue Oct 30 13:21:38 GMT+3 2007
Hello.
I am wondering how can I respond to certian key presses? for instance,
when not in an edit field, I want to be able respond to some simple key
presses to take action on, such as when the user presses D or K or L. I
want to do something. I am having problems getting those key presses. I
figured I would just:
int myActionCallback (Ihandle *self, int ch, int lin, int col, int
active, char *after)
{
printf ("Ch=%i lin=%i col=%i\n", ch, lin, col);
switch (ch)
{
case 'D':
do something
return IUP_IGNORE;
case 'K':
do something else
return IUP_IGNORE;
}
return IUP_DEFAULT;
}
IupSetCallback (myMatrix, "ACTION", (Icallback) myActionCallback);
But w/the above, it never seems as though my action callback function is
called. Any thoughts?
Jeremy
More information about the iup-users
mailing list