nanogui: how to get the input of KEY?
Subject:
Re: how to get the input of KEY?
From:
Jordan Crouse ####@####.####
Date:
10 May 2001 13:43:19 -0000
Message-Id: <01051007431802.08795@cosmic>
Thats really easy. Each event type (button, key, exposure, etc....) has a
structure. The GR_EVENT structure is really a union of all the different
types of event structures, including the GR_EVENT_KEYSTROKE structure.
So, using your example, you can get the keystroke information from
event.keystroke.
See nano-X.h for the full description of the GR_EVENT_KEYSTROKE structure.
Jordan
event.On Wednesday 09 May 2001 22:00, atom mentioned:
> hi
> how to get the input of KEY?
> I know how to get the input of mouse , for example :
> buttons = GrNewWindow(...);
> GrMapWindow(buttons);
> GrSelectEvents(buttons, GR_EVENT_MASK_BUTTON_DOWN);
> GrGetNextEvent(&event);
> then event->button.x and event->button.y give me the
> mouses X and Y.
> if I GrSelectEvents(buttons, GR_EVENT_MASK_BUTTON_DOWN |
> GR_EVENT_MASK_KEY_DOWN) , then how to get the input of KEY?
>
> thanks
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ####@####.####
> For additional commands, e-mail: ####@####.####