🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #9656

Re: Keyboard input

#9656
From: David Ashley
Date: Wed, 31 Aug 1988 17:19
38 lines
2175 bytes
In article <4033@umd5.umd.edu> brett@pigpen.UMD.EDU (Brett S Bourbin) writes:
>
>Does anyone know what the best method is for checking certain key presses
>if you don't open an Intuition Window?  I have created my own screen using
>ViewPorts and wish to receive input.

Read in the RKM Volume #1, the chapter on the input.device. What you want
to do is install an input handler at higher priority than intuition, which
is at 50. It will require writing a small routine in assembly language.

The small routine is the input handler itself. It is passed a pointer to
a chain of input events in a0, and you may trash a0,a1 and d1. You must
exit with d0 pointing to the list of input events that you want to pass on.

What I do is scan the list looking for anything interesting, like raw keys
or mouse moves. Then pass a 0 in d0, so no one gets anything. That way, I
get all events, and the user cannot try and mess up my display by trying
to pull down windows, screens, and the software overhead imposed by
intuition when the mouse is moved is avoided. Most programs slow down
when the mouse is moved.

The drawback is that the mouse pointer is stuck wherever it was when the
program was run, and it cannot be moved. It would be nice if you could
turn sprite #0 off without having to open an intuition window and calling
SetPointer() with a null figure.

Maybe you could:
Forbid()
Find the Active window
Mess with its sprite information (What it looks like, height, etc)
Install the input handler, effectively turning off intuition
Permit()

Although sometimes your program could be run with no visible windows (like
from the Workbench.)

koster@cory.berkeley.edu
David Ashley
Technical Details
Message-ID: <5345@pasteur.Berkeley.EDU>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!cory.Berkeley.EDU!koster
References: <4033@umd5.umd.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!cory.Berkeley.EDU!koster
From: koster@cory.Berkeley.EDU (David Ashley)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Keyboard input
Message-ID: <5345@pasteur.Berkeley.EDU>
Date: 31 Aug 88 17:19:38 GMT
References: <4033@umd5.umd.edu>
Sender: news@pasteur.Berkeley.EDU
Reply-To: koster@cory.Berkeley.EDU.UUCP (David Ashley)
Organization: University of California, Berkeley
Lines: 37