home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / windows / x / 15277 < prev    next >
Encoding:
Text File  |  1992-08-15  |  952 b   |  30 lines

  1. Newsgroups: comp.windows.x
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!uchinews!msuinfo!anchovy.cps.msu.edu!vaitkus
  3. From: vaitkus@anchovy.cps.msu.edu (Keith P Vaitkus)
  4. Subject: Keyboard input with X
  5. Message-ID: <1992Aug15.160543.28140@msuinfo.cl.msu.edu>
  6. Keywords: keyboard
  7. Sender: news@msuinfo.cl.msu.edu
  8. Organization: Dept. of Computer Science, Michigan State University
  9. Date: Sat, 15 Aug 92 16:05:43 GMT
  10. Lines: 18
  11.  
  12. Can someone tell me how to determine which keys have been pressed w/i and X
  13. program? 
  14.  
  15. The book I'm using says to use the function XLookupString() in the
  16. event->xkey.keycode structure, BUT it doesn;t say how to. I wrote this code to
  17. determine if the last key pressed was a space, but all my attempts end with a seg
  18. fault....
  19.  
  20.  
  21.   if (XLookupString (event->xkey.keycode) == ' ')
  22.     {
  23.     etc.
  24.     } 
  25.  
  26. I would be grateful for any insight into this problem someone can give me.
  27.  
  28. Thanks in advance,
  29.     -Keith
  30.