home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / fj / maillis / xwindow / 19034 < prev    next >
Encoding:
Text File  |  1992-12-31  |  2.1 KB  |  71 lines

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