home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.sgi
- Path: sparky!uunet!ukma!wupost!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!usenet-feed.cc.umr.edu!lcoffin
- From: lcoffin@usenet.umr.edu (Larry Coffin)
- Subject: Controlling the mouse w/ keyboard/blocking keys
- Date: Thu, 12 Nov 1992 23:34:50 GMT
- Nntp-Posting-Host: clciris.chem.umr.edu
- Organization: University of Missouri -- Rolla
- Sender: Larry Coffin <lcoffin@clciris.chem.umr.edu>
- Summary: How to?
- Message-ID: <1992Nov12.233450.6341@umr.edu>
- Lines: 42
-
- We recently had our mouse pad (optical) disappear from our computer
- room and I am trying to control the mouse with the keypad (ie. PAD6 moves
- the mouse to the right, etc.). I'm doing this using setvaluator(). This
- seems to work ok except that the key presses on the keypad are being sent
- to whatever windows are below the mouse. Is there some way to block those
- key presses? To turn off the keypad for programs other than the mouse
- controlling program?
-
- The program is basically:
-
- main()
- {
- noport()
- winopen()
-
- qdevice(PAD1 - PAD9)
-
- forever {
- if(getbutton(PAD1 - PAD9)){
- x = MOUSEX
- y = MOUSEY
- change x, y according to key pressed
- setvaluator(MOUSEX, x, 0, 1279)
- setvaluator(MOUSEY, y, 0, 1023)
- }
- }
- }
-
- Is there some better way to control the mouse without from the
- keyboard? (Or should the question be: Is there a better way to control the
- mouse without the mouse pad?) (And: Yes, I did try drawing black lines on a
- piece of aluminum foil!!! It did not work as well as the original!! 8-} )
-
-
- ---Larry Coffin
- lcoffin@clciris.chem.umr.edu
-
-
- PS. Could you please send answers to me directly?
-
-
-
-