Q68 Capslock Indicator

Anything QL Software or Programming Related.
Post Reply
User avatar
dilwyn
Mr QL
Posts: 2761
Joined: Wed Dec 01, 2010 10:39 pm

Q68 Capslock Indicator

Post by dilwyn »

Here's my first Q68-specific software, a Caps Lock indicator which hijacks the yellow LED on the front panel of the Q68 to use as a visible substitute for the absence of a Caps Lock light on PS/2 keyboards connected to the Q68.

Finding myself accidentally hitting Caps Lock by mistake from time to time, and being unsure of its status as there was no indication, then having to delete and correct capital letters, I wrote this little SBASIC program which can be executed as a background job to monitor the Caps Lock setting. Via a simple POKE command, it uses the otherwise unused yellow LED on the front panel of the Q68 as a Caps Lock indicator. This LED's status can be set from the Config block of SMSQ/E to stay on or switch off after the Q68 has started up. Either way this program overrides it.

In addition to the simple Caps Lock indication, the program can also give an audible note on toggling Caps Lock off or on (different tones for both states). The program can also be set to give a tone if you type an upper case letter.

All options can be enabled or disabled by altering a variable at the start of the program - see the instructions.

Just two files in the attached zip, the very short CAPSLOCK_bas program, and CAPSLOCK_doc (instructions Quill doc file).

To start the Caps Lock program just issue a command such as:

EX CAPSLOCK_bas

It runs as a low priority background job, notes in the instructions on how to change this. If you wish to stop the running job at any time, press CTRL SHIFT Caps Lock. This Quit keypress can be altered in the program if you wish.

This program is of course specific to Q68. And as I have no idea if the yellow LED on the front panel of my very recent Q68 is unique to current Q68's or is fitted to older Q68s too, I'd be very grateful if someone with an older Q68 could test it to check if it works on all Q68's. Feedback welcome.
Q68capslock.zip
Q68 Caps Lock Indicator Program
(4.5 KiB) Downloaded 96 times


Derek_Stewart
Font of All Knowledge
Posts: 3975
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: Q68 Capslock Indicator

Post by Derek_Stewart »

Hi Dilwyn,

I used to use the Yellow LED as a power indicator, till LED incorporated into the power switch was fitted.

The Yellow LED, which is a programmable LED, I configured SMSQ/E to be on at power up.

But the QL Network driver, uses the Programmable LED to indicate Network activity on the QL Network. So when the driver is loaded and FSERVE is entered the Yellow LED goes off.

This might cause problems with your programme.

I suppose if the Network driver saved the condition of the LED, there woukd no problem.


Regards,

Derek
User avatar
Peter
Font of All Knowledge
Posts: 2011
Joined: Sat Jan 22, 2011 8:47 am

Re: Q68 Capslock Indicator

Post by Peter »

Hi Dilwyn,
thanks for this little goodie.
dilwyn wrote: Wed Jun 14, 2023 8:45 pm And as I have no idea if the yellow LED on the front panel of my very recent Q68 is unique to current Q68's or is fitted to older Q68s too, I'd be very grateful if someone with an older Q68 could test it to check if it works on all Q68's.
There were no changes to the Q68 mainboard. As for the programmable LED, see pages 5 and 7 of the Q68 manual on your website:
https://dilwyn.qlforum.co.uk/q68/Q68%20 ... Manual.pdf
All the best
Peter


User avatar
dilwyn
Mr QL
Posts: 2761
Joined: Wed Dec 01, 2010 10:39 pm

Re: Q68 Capslock Indicator

Post by dilwyn »

Thank you Peter. The manual is where I got the LED information from to write this.

I note Derek's comment about the network making use of the programmable LED.


Derek_Stewart
Font of All Knowledge
Posts: 3975
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: Q68 Capslock Indicator

Post by Derek_Stewart »

Hi Dilwyn,

While using the Q68 programmable LED is a good idea, I like the use of SMSQ/E Cursor as a Sprite and I use your CAPS programme you detailed in this thread: viewtopic.php?t=892


Regards,

Derek
User avatar
dilwyn
Mr QL
Posts: 2761
Joined: Wed Dec 01, 2010 10:39 pm

Re: Q68 Capslock Indicator

Post by dilwyn »

And of course changing the cursor avoids any issues with the Q68 LED being used by other applications, such as the network.


Derek_Stewart
Font of All Knowledge
Posts: 3975
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: Q68 Capslock Indicator

Post by Derek_Stewart »

HI Dilwyn,

I suppose the Network driver could be enhanced to save the status of the Programmable LED and restore it when, Network activity is on present.

I like the custom cursor idea, allows a little individuality.


Regards,

Derek
User avatar
Peter
Font of All Knowledge
Posts: 2011
Joined: Sat Jan 22, 2011 8:47 am

Re: Q68 Capslock Indicator

Post by Peter »

dilwyn wrote: Tue Jan 16, 2024 10:58 pm And of course changing the cursor avoids any issues with the Q68 LED being used by other applications, such as the network.
Great idea, I had missed that!


Post Reply