home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / windows / x / 15632 < prev    next >
Encoding:
Internet Message Format  |  1992-08-25  |  2.7 KB

  1. Path: sparky!uunet!convex!darwin.sura.net!news.larc.nasa.gov!uakari.primate.wisc.edu!ames!agate!tfs.com!tfs.com!matt
  2. From: matt@tfs.com (Matthew Hom)
  3. Newsgroups: comp.windows.x
  4. Subject: Escape and Tab keys to modal dialog?
  5. Keywords: motif dialog translations
  6. Message-ID: <1992Aug26.000834.14081@tfs.com>
  7. Date: 26 Aug 92 00:08:34 GMT
  8. References: <1992Aug25.220652.2266@news.nd.edu>
  9. Sender: matt@tfs.com
  10. Followup-To: poster
  11. Distribution: comp.windows.x.intrinsics comp.windows.x.motif
  12. Organization: TRW Financial Systems
  13. Lines: 47
  14.  
  15. I'm using Wcl and Motif in my X Window keying application. If anyone
  16. can shed any light on this, I'd appreciate it. Thanks.
  17.  
  18. Our customer has requested a change in key assignments for the keying
  19. application. One of the changes involves mapping the Escape key and
  20. the Tab key. I've been using the key accelerator in the pulldown menus
  21. as a convenient mechanism for doing this. The customer also wants
  22. alternative keys to cause the same action (i.e. F9 and Shift+9). I use
  23. translation tables to augment certain widgets by mapping these
  24. alternative key sequences to activate callbacks for the corresponding
  25. buttons in the pulldown menu.
  26.  
  27. Everything works fine except when my application modal dialogs are managed.
  28. I augment the translations of the dialog to map certain key sequences
  29. to my callbacks. The key sequences work for most keys except for Tab
  30. and Escape. How come? Are these being consumed by the dialog? I tried
  31. to override the translations for the dialog or list widget but I loose
  32. to much functionality in the list widget (arrow keys, CR, etc.). 
  33.  
  34. *ListDialog*Translations: #augment\n\
  35. Ctrl<Key>Q:     TfsActionActivateCallbacks( *QuitBtn ) \n \
  36. Alt<Key>Left:   WcUnmanageACT( *ListDialog ) TfsActionPrevImage() \n\
  37. Alt<Key>Right:  WcUnmanageACT( *ListDialog ) TfsActionNextImage() \n\
  38. <Key>Tab:       TfsActionActivateCallbacks( *OopsBtn ) \n\
  39. <Key>Escape:    WcUnmanageACT( *ListDialog ) TfsActionActivateCallbacks( *PassBtn ) \n\
  40. <Key>:          TfsActionSelectListItem( *Number*Field1 )
  41.  
  42. The widget hierarchy for this dialog is"
  43.  
  44.     Form Dialog Widget
  45.         List Widget
  46.  
  47. Is there a resource that I can set to allow Tab and Escape to get through
  48. to my action procedures? I tried to augment the translations on the parent
  49. of the ListDialog (ListDialog_popup) as well, but that has no effect. 
  50.  
  51. Please send responses to matt@tfs.com.
  52.  
  53. -- 
  54. +-----------------------------------------------------------------------+
  55. | These are my opinions and are not necessarily those of my employer.   |
  56. +-----------------------------------------------------------------------+
  57. | Matt Hom                matt@tfs.com            |
  58. | TRW Financial Systems            (310)590-7510            |
  59. | 200 Oceangate, Suite 1000                        |
  60. | Long Beach, CA 90802-4336                        |
  61. +-----------------------------------------------------------------------+
  62.