Short:        Generates WARN (5) codes on qualifiers
Author:       Frederic Delacroix
Type:         util/boot
Architecture: m68k-amigaos
Source:       Fish collection

The  reason  for  this  program  to be is that I recently had trouble in finding
which  of  the  programs  launched in my user-startup was sometimes crashing the
system.  I wrote a special version of the user-startup that asked before running
all programs, and thought it would be great to have a program allowing to switch
the files automatically when a key was hit.

The  best candidates for those keys were of course the qualifiers, since they do
not  interfere  with the output window.  Moreover, there is a new (V36) function
in  the input.device that would make it easy to test:  PeekQualifier().  So here
is this program, which does not even require a window to be opened to work.  The
program fits in one disk block, and is pure, meaning it can be made resident.

To use PeekQual, you must have kickstart 2.04 or higher.  It will only work from
CLI, the template is as follows:

PeekQual ONQUAL,OFFQUAL

	Each  of the arguments, ONQUAL and OFFQUAL, should be a word made of the
following  letters  (I've tried to respect this rule:  lower case for left keys,
and upper case for right ones):

	s:	left Shift
	S:	right Shift
	c:	Control
	C:	Caps lock
	a:	left Alt
	A:	right Alt
	g:	left amiGa
	G:	right amiGa
	b:	left mouse Button
	B:	right mouse Button
	m:	Middle mouse button

	The  program does the following:  it PeekQualifier()s and then tests the
result:  if all keys given in the ONQUAL argument are pressed and all keys given
in  the  OFFQUAL argument are NOT be pressed, then the program returns WARN (5),
else  it returns OK (0).  The result can then be tested with the IF WARN command
in  a  script  file.   All qualifiers given neither in ONQUAL nor in OFFQUAL are
ignored.

Example, in your startup-sequence:

PeekQual CSs
IF WARN
 Execute S:User-Startup.Debug
ELSE
 Execute S:User-Startup
ENDIF

Frederic Delacroix
5 rue d'Artres
59269 Querenaing
FRANCE