home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / windows / x / 20675 < prev    next >
Encoding:
Text File  |  1992-12-31  |  1.9 KB  |  63 lines

  1. Path: sparky!uunet!gatech!emory!rsiatl!holos0!teldata!joubert
  2. From: joubert@teldata.UUCP (Joubert Berger)
  3. Newsgroups: comp.windows.x
  4. Subject: Translation Tabels Question
  5. Message-ID: <668@teldata.UUCP>
  6. Date: 30 Dec 92 23:43:07 GMT
  7. Organization: Advance Financial Corporation / Teldate Computer Industries, Inc.
  8. Lines: 53
  9.  
  10. I need some help with Translation Tables.  This is the first time I have
  11. had to use them, so I am new at using them.  Anyway ...
  12.  
  13. I have a text widget.  I want to read the characters from the keyboard
  14. but not display them in the text widget.  So I have done the following:
  15.  
  16.       -------------------------------------
  17.                       .
  18.                       .
  19.                       .
  20.  
  21. void insert(Widget w, XExposeEvent *event, String *params,
  22.                Cardinal *num_params)
  23. {
  24. /* how do I get to the character here */
  25. /* Say I want to stuff it into a file */
  26. }
  27.  
  28.                       .
  29.                       .
  30.                       .
  31.  
  32. main()
  33. {
  34.    XtActionsRec window_actions[] = { {"insert", insert} };
  35.  
  36.                       .
  37.                       .
  38.                       .
  39.  
  40.  
  41.   XtAppAddActions(app, window_actions, XtNumber(window_actions));
  42.   XtOverrideTranslations(text_w,
  43.                              XtParseTranslationTable("<Key>: insert()"));
  44.   XtRealizeWidget(toplevel);
  45.  
  46.   XtAppMainLoop(app);
  47. }
  48.  
  49.       -------------------------------------
  50.  
  51. So now here is the problem.  How can I get to the character that was just
  52. typed?  I have no problems firing off the "insert()" function when I hit a key
  53. but I now need to be able to get to the character.  Any help would be great.
  54.  
  55. Thanks in advance.
  56.  
  57.            Joubert
  58. -- 
  59. Joubert Berger                   | Email:  
  60. Teldata Computer Industries, Inc.| joubert@teldata.uucp
  61. Atlanta, Georgia  (404) 256-2166 | joubert%teldata.uucp@mathcs.emory.edu
  62.                                  | {rutgers,ogicse,gatech}!emory!teldata!joubert
  63.