Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!think.com!mintaka!geech.gnu.ai.mit.edu!rjc From: rjc@geech.gnu.ai.mit.edu (Ray Cromwell) Newsgroups: comp.sys.amiga.programmer Subject: Re: RMB question Message-ID: <1991May11.233441.25457@mintaka.lcs.mit.edu> Date: 11 May 91 23:34:41 GMT References: <21412@cbmvax.commodore.com> <1991May11.010739.24499@zorch.SF-Bay.ORG> Sender: news@mintaka.lcs.mit.edu Organization: The Internet Lines: 79 In article mykes@amiga0.SF-Bay.ORG (Mike Schwartz) writes: >In article <1991May11.010739.24499@zorch.SF-Bay.ORG> mike@zorch.SF-Bay.ORG (Mike Smithwick) writes: >>In article <21412@cbmvax.commodore.com> peter@cbmvax.commodore.com (Peter Cherna) writes: >>>In article <1991May8.155337.5049@zorch.SF-Bay.ORG> mike@zorch.SF-Bay.ORG (Mike Smithwick) writes: >><>[] >><> >><>Is there an easy and legal way to catch a right-mouse button event under >><>intuition while still having access to the menus (since RMBTRAP traps >><>the right-button before the menu stuff could get it). >>< >>>>>< >><>mike >>< >>< Peter >><-- >>> >>Trouble with MENUVERIFY is that I get only a single message. I need to know >>both MENUDOWN and MENUUP events which MENUVERIFY won't give. >> >>mike >>-- >>"There is no problem to big that can't be solved with high explosives"-Rush >> >>Mike Smithwick - ames!zorch!mike >> > >You can use: > >; POTGOR equ $dff016 > >_RightMouseButton > btst #2,POTGOR ; right mouse button status > beq .rmbDown >.rmbUp moveq #0,d0 > rts >.rmbDown moveq #-1,d0 > rts > >to check for the right mouse button. > >I know about using hard coded numbers instead of labels, but remember >that this code is just for illustration purposes (i.e. code it as YOU >see fit). > >You would use a routine like this after getting your MenuVerify and only >when you know that yours is the front screen. This interferes in NO way >with the OS. Besides this fact that this is illegal (you didn't Allocate the pot bits nor did you use gameport.device) please don't use releases like this, I'll explain why. Intuition allows keyboard shortcuts for the mouse buttons (Alt-LAmiga=LMB Alt-RAmiga=RMB). Those great C= mice break down a lot, particularly the mouse buttons. My LMB is slightly broken and sometimes I have to use the keyboard shortcut. You're routine kills my chances of using the keyboard or using any non-standard input device/hack. Use the OS for stuff like this. There a few solutions to this problem. 1) Install an input handler/commodity and watch RMB events. 2) Use RMBTRAP and then disable RMBTRAP, and fake a mouse event on intuition? Would this work? 3) SetMPort on input.device? There has to be an OS solution that is better than going to the hardware. >-- >**************************************************** >* I want games that look like Shadow of the Beast * >* but play like Leisure Suit Larry. * >**************************************************** -- / INET:rjc@gnu.ai.mit.edu * // The opinions expressed here do not \ | INET:r_cromwe@upr2.clu.net | \X/ in any way reflect the views of my self.| \ UUCP:uunet!tnc!m0023 * /