home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / sgi / 16370 < prev    next >
Encoding:
Text File  |  1992-11-12  |  1.6 KB  |  55 lines

  1. Newsgroups: comp.sys.sgi
  2. Path: sparky!uunet!ukma!wupost!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!usenet-feed.cc.umr.edu!lcoffin
  3. From: lcoffin@usenet.umr.edu (Larry Coffin)
  4. Subject: Controlling the mouse w/ keyboard/blocking keys
  5. Date: Thu, 12 Nov 1992 23:34:50 GMT
  6. Nntp-Posting-Host: clciris.chem.umr.edu
  7. Organization: University of Missouri -- Rolla
  8. Sender: Larry Coffin <lcoffin@clciris.chem.umr.edu>
  9. Summary: How to?
  10. Message-ID: <1992Nov12.233450.6341@umr.edu>
  11. Lines: 42
  12.  
  13.     We recently had our mouse pad (optical) disappear from our computer
  14. room and I am trying to control the mouse with the keypad (ie. PAD6 moves
  15. the mouse to the right, etc.). I'm doing this using setvaluator().  This
  16. seems to work ok except that the key presses on the keypad are being sent
  17. to whatever windows are below the mouse.  Is there some way to block those
  18. key presses?  To turn off the keypad for programs other than the mouse
  19. controlling program?
  20.  
  21.     The program is basically:
  22.  
  23. main()
  24. {
  25.     noport()
  26.     winopen()
  27.  
  28.     qdevice(PAD1 - PAD9)
  29.  
  30.     forever {
  31.         if(getbutton(PAD1 - PAD9)){
  32.             x = MOUSEX
  33.             y = MOUSEY
  34.             change x, y according to key pressed
  35.             setvaluator(MOUSEX, x, 0, 1279)
  36.             setvaluator(MOUSEY, y, 0, 1023)
  37.         }
  38.     }
  39. }
  40.  
  41.     Is there some better way to control the mouse without from the
  42. keyboard?  (Or should the question be: Is there a better way to control the
  43. mouse without the mouse pad?) (And: Yes, I did try drawing black lines on a
  44. piece of aluminum foil!!!  It did not work as well as the original!! 8-}  )
  45.  
  46.  
  47.     ---Larry Coffin
  48.         lcoffin@clciris.chem.umr.edu
  49.  
  50.  
  51. PS.  Could you please send answers to me directly?
  52.  
  53.  
  54.  
  55.