nanogui: Using The TAB Key


Previous by date: 27 Sep 2006 14:33:55 +0100 Re: Problems with image displaying, pratish ganguly
Next by date: 27 Sep 2006 14:33:55 +0100 Re: Setting background as transparent, celeber2.gmail.com
Previous in thread: 27 Sep 2006 14:33:55 +0100 Using The TAB Key, pratish ganguly
Next in thread: 27 Sep 2006 14:33:55 +0100 Re: Using The TAB Key, Greg Haerr

Subject: Re: Using The TAB Key
From: "pratish ganguly" ####@####.####
Date: 27 Sep 2006 14:33:55 +0100
Message-Id: <fa595afb0609270633t178b939ev57c6e844d56b9e28@mail.gmail.com>

Dear all,

Thank you all for your support in helping me out of this problem.
I am now able to use the ASCII characters in my code but still not able to
use the special keys as I keep getting on the same error message.
Please suggest me some pointers to resolve this problem.

Thanks and regards
Pratish Ganguly


---------- Forwarded message ----------
From: pratish ganguly ####@####.####
Date: Sep 26, 2006 12:35 PM
Subject: Using The TAB Key
To: ####@####.####

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

Previous by date: 27 Sep 2006 14:33:55 +0100 Re: Problems with image displaying, pratish ganguly
Next by date: 27 Sep 2006 14:33:55 +0100 Re: Setting background as transparent, celeber2.gmail.com
Previous in thread: 27 Sep 2006 14:33:55 +0100 Using The TAB Key, pratish ganguly
Next in thread: 27 Sep 2006 14:33:55 +0100 Re: Using The TAB Key, Greg Haerr


Powered by ezmlm-browse 0.20.