AminetAminet
Search:
84734 packages online
About
Recent
Browse
Search
Upload
Setup
Services

util/cli/CapsTestPPC.lha

Mirror:Random
Showing: m68k-amigaos iconppc-amigaos iconppc-morphos iconi386-aros iconi386-amithlon iconppc-warpup iconppc-powerup icongeneric icon
No screenshot available
Short:Reports caps lock status (for scripts)
Author: lauri.aalto at fipnet.fi
Type:util/cli
Architecture:ppc-amigaos
Date:2012-12-08
Download:util/cli/CapsTestPPC.lha - View contents
Readme:util/cli/CapsTestPPC.readme
Downloads:789

This is an updated OS4 version of the original 68k CapsTest.

I added return codes to make it more convenient for use in scripts, that
way there's no need to use backticks, but the default output (0 or 1)
should be redirected to NIL: like so:

CapsTest >NIL:
If WARN
 Echo Caps lock was active
Else
 Echo Caps lock was inactive
EndIf

It's quite handy in Startup-Sequence and User-Startup, to make them skip
sections or temporarily enable some feature.

History:

V2.0 07.12.2012
- Rewritten to use PeekQualifier() as suggested by RWO.
- Now works with USB keyboards.
- Executable size is now 8KB instead of 66KB.

V1.1 28.09.2009
- Ported to PPC/OS4
- Added return codes, 5 = Caps Lock is ON, 0 = Caps Lock is OFF, 20 means
  that something went really wrong (failed port/device/memory allocation)
 
V1.0 02.12.1994
- Original 68k Version


Original ReadMe:

I needed a simple program for my scripts which would examine the status of
the caps lock key and report it so the script could act respectively. After
a quick scan over my file base I was unable to find such a tool so I
decided to write one of my own. Here's the result.

Usage:

if `capstest` eq 1		; capstest returns either 0 or 1
  echo "Caps lock was active"
else
  echo "Caps lock was inactive"
endif

Source code compilable at least with DICE 3.0 has been included. Just type
'execute capstest.c' to compile. Feel free to do whatever with these files
- they're all public domain.


Contents of util/cli/CapsTestPPC.lha
PERMISSION  UID  GID    PACKED    SIZE  RATIO METHOD CRC     STAMP     NAME
---------- ----------- ------- ------- ------ ---------- ------------ ----------
[unknown]                 4399    5052  87.1% -lh5- dfee Dec  7 19:58 CapsTestPPC_2.0.info
[unknown]                 2313    7975  29.0% -lh5- 2bf3 Dec  7 06:57 CapsTestPPC_2.0/CapsTest
[unknown]                  514     872  58.9% -lh5- 614a Dec  7 06:56 CapsTestPPC_2.0/capstest.c
[unknown]                  922    1583  58.2% -lh5- d203 Dec  7 07:07 CapsTestPPC_2.0/CapsTest.readme
[unknown]                  679    1360  49.9% -lh5- 07f6 Dec  2  1994 CapsTestPPC_2.0/capstest11.c
---------- ----------- ------- ------- ------ ---------- ------------ ----------
 Total         5 files    8827   16842  52.4%            Dec  7 21:23
Page generated in 0.02 seconds
Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>