Caps
                                    ====

                           Capslock indicator


Needs SMSQ/E (or Qdos + TK2 + PE + EasyPtr's ptrmen_cde) Qpac2 and Qlib_run

Seems a lot for a tiny program, but most of this would be expected to be
part of any high-end system, so I make no apologies. Whats the point of
all these systems extensions if not exactly for the reason of making large
and small utilies quicker and easier to make? They also then fit into a
more or less sane, organised, framework, rather than being all over the
place in anarchic confusion. Theres plenty of that to spare for punters to
frolick in!


How to
======

Unzip the archive into a suitable directory <path> then add the following
line, or similar, to your boot file at some point:

        EX '<path>Qaps_obj':                    rem Qdos or SMSQ/E

or
        EX '<path>Caps_obj'; commandline$:      rem SMSQ/E only


Presuming the Button_frame Thing from Qpac2 is present, Caps will slot in
between the last button defined and the next.

Two varieties are included in this package: The old Caps V0.03, now called
Qaps to differentiate it from the new Caps V0.04.

Qaps (Caps V0.03) should run under Qdos and SMSQ/E; Caps V0.04 only works
with SMSQ/E.

Caps doesnt do much interaction: it is not possible to set the capslock by
clicking it. At least on emulators capslock is read-only. However, if you
hover your pointer over the Caps button and press ESC it will terminate
the job.

Caps is supposed to display a round blob in the button frame. When
capslock is engaged, a round red blob appears in the middle. The intention
is that these blobs should be highly visible. Clearly, if you are
red/green colour blind this may not be the case, in which case you should
opt for a different colour scheme - or get a different utility.

The only way to configure Qaps is to alter the code and re-compile it. The
Button toolkit required can be found at Knoware.no.

Caps V0.04 can be configured via the commandline:

        /Q      - QL colours    b:f:s   0..255 each
        /R      - RGB colours   b:f:s   [$]0..FFFFFF each
        /W      - Wman colours  b:f:s   512..1024 each
        /P      - Palette       0..3    (Wman only)
        /S      - Sound         0/1     off/on

All commands are optional and may be given, once, in any order. Each command
must be followed by a correctly specified parameter. Only one of /Q /R or
/W may be given!

eg:
        ex 'win1_uti_caps_Caps_obj';'/Q0:4:2 /S0'

Meaning: Using QL colours black Background, green Foreground blob, and red
Spot, with sound off. This also happens to be the default behaviour, ie the
same as if you didnt supply a commandline at all.

        ex 'win1_uti_caps_Caps_obj';'/R 70:ff00:ff0000 /S1'
        ex 'win1_uti_caps_Caps_obj';'/R$70:$ff00:$ff0000 /S1'

The above two examples do the same thing. If RGB is selected all colours
must be specified in 24-bit hex, with or without a leading dollar sign.

        ex 'win1_uti_caps_Caps_obj';'/W  513:522:523   /p3'

Here Window Manager palette codes are used. Sound is off. Some whimsical
spacing is permitted, as you see.

Note: Supplying a palette number only makes a difference if the /W option
is used as well.


Troubleshooting
===============

If the blobs do not appear round, perhaps you need to correct the display
ratio. On SMSQ/E you could try the following POKE, and if it works, add it
to your boot file:

        POKE_F! $C4! $14A, (scrX / scrY) / (dispX / dispY)

with scrX/scrY being the logical resolution and dispX/dispY being the
physical resolution of your display. Say your "QL" is displaying 1024x512
pixels in full screen on a HD (ie 1920x1080) monitor. Then youd get:

        scrX = SCR_XLIM: scrY = SCR_YLIM
        POKE_F! $C4! $14A, (scrX / scrY) / (1920 / 1080)

Note: POKE_F has to be the SMSQ/E POKE_F, not the one from the Turbo
toolkit, or else this line will fail!


Program status
==============

V0.04, pjw, 2022 Jun 21

                  Conditions and DISCLAIMER as per Knoware.no

Generated by QuickHTM, 2022 Jun 30