home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!spool.mu.edu!sgiblab!nec-gw!nec-tyo!wnoc-tyo-news!scslwide!wsgw!wsservra!onoe
- From: teldata!joubert@bloom-beacon.MIT.EDU (Joubert Berger)
- Newsgroups: fj.mail-lists.x-window
- Subject: Translation Tabels Question
- Message-ID: <1992Dec31.212929.1101@sm.sony.co.jp>
- Date: 31 Dec 92 21:29:29 GMT
- Sender: onoe@sm.sony.co.jp (Atsushi Onoe)
- Distribution: fj
- Organization: Advance Financial Corporation / Teldate Computer Industries, Inc.
- Lines: 58
- Approved: michael@sm.sony.co.jp
-
- Date: 30 Dec 92 23:43:07 GMT
- Message-Id: <668@teldata.UUCP>
- Newsgroups: comp.windows.x
- Sender: xpert-request@expo.lcs.mit.edu
-
- I need some help with Translation Tables. This is the first time I have
- had to use them, so I am new at using them. Anyway ...
-
- I have a text widget. I want to read the characters from the keyboard
- but not display them in the text widget. So I have done the following:
-
- -------------------------------------
- .
- .
- .
-
- void insert(Widget w, XExposeEvent *event, String *params,
- Cardinal *num_params)
- {
- /* how do I get to the character here */
- /* Say I want to stuff it into a file */
- }
-
- .
- .
- .
-
- main()
- {
- XtActionsRec window_actions[] = { {"insert", insert} };
-
- .
- .
- .
-
-
- XtAppAddActions(app, window_actions, XtNumber(window_actions));
- XtOverrideTranslations(text_w,
- XtParseTranslationTable("<Key>: insert()"));
- XtRealizeWidget(toplevel);
-
- XtAppMainLoop(app);
- }
-
- -------------------------------------
-
- So now here is the problem. How can I get to the character that was just
- typed? I have no problems firing off the "insert()" function when I hit a key
- but I now need to be able to get to the character. Any help would be great.
-
- Thanks in advance.
-
- Joubert
- --
- Joubert Berger | Email:
- Teldata Computer Industries, Inc.| joubert@teldata.uucp
- Atlanta, Georgia (404) 256-2166 | joubert%teldata.uucp@mathcs.emory.edu
- | {rutgers,ogicse,gatech}!emory!teldata!joubert
-