nanogui: Using The TAB Key
Subject:
Using The TAB Key
From:
"pratish ganguly" ####@####.####
Date:
26 Sep 2006 08:05:42 +0100
Message-Id: <fa595afb0609260005w35be728ay563d5028092328be@mail.gmail.com>
Dear all,
I am now able to display images on the nano-X server.
But I am not able to use the tab key in it.
I searched the net and found the following (
http://embedded.centurysoftware.com/docs/nx/nxstruct_GR_EVENT_KEYSTROKE.html) :
typedef struct
{
GR_EVENT_TYPE type;
GR_WINDOW_ID wid;
GR_WINDOW_ID subwid;
GR_COORD rootx;
GR_COORD rooty;
GR_COORD x;
GR_COORD y;
int buttons;
int modifiers;
GR_UNICODE uch;
unsigned int special;
GR_CHAR ch;
unsigned char content;
} GR_EVENT_KEYSTROKE;
In the description section it is given that
unsigned int special
Special key sequences (see below).
GR_KEYSTROKE_CONTENT_SPECIAL The special field contains
a special key (see below).
GR_SPECIAL_KEY_TAB The Tab key.
I tried the following things :
GrSelectEvents(GR_ROOT_WINDOW_ID, GR_EVENT_MASK_KEY_DOWN |
GR_EVENT_MASK_BUTTON_DOWN | GR_EVENT_MASK_EXPOSURE );
........
while(1)
{
GrGetNextEvent(&event);
switch (event.special)
{
case GR_SPECIAL_KEY_TAB :
....
....
....
break;
}
}
I got the error
error: union has no member named 'special'
error: 'GR_SPECIAL_KEY_TAB' undeclared
Not even using the following code solves the problem.
switch (event.type)
{
case GR_EVENT_TYPE_KEY_DOWN:
....
....
....
break;
}
I am not able take any action when I am pressing any key on the keyboard.
I get no error on compilation or on execution but there is no action on the
specific key press event.
Am I missing something here ?
Kindly give me some pointers to resolve this problem.
Thanks and regards.
Pratish Ganguly