From: mop15361 AT mail DOT telepac DOT pt-nospam (Milton Moura) Newsgroups: comp.os.msdos.djgpp Subject: Re: Keyboard Functions with Allegro Date: Tue, 12 Aug 1997 13:50:13 GMT Organization: garbage Lines: 44 Message-ID: <33f16855.2214910@news.telepac.pt> Reply-To: mop15361 AT mail DOT telepac DOT pt-nospam NNTP-Posting-Host: 194.65.243.171 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk >>Hello, >> >>I was wondering if it is possible to turn the lights on the keyboard on >>and off using functions in Allegro. I don't just want to activate or >>deactivate the num lock and caps lock but I want to be albe to make >>thier light flash on and off. There is a function for putting a >>keypress in the buffer but I don't know if that would work. >>Please give advice and please reply via email. I am no longer >>subscribed due to the very large amount of mail that the mailing list >>sends. >I doubt if its possible, BUT if it is, could you post anything here and >CC it to Jason. >I'm almost certain if it is possible, the answer doesn't lie in Allegro, >but in accessing the keyboards port directly. Doing something naughty >like hitting the hardware directly, telling everything else thats >running to shut up moaning I'm going to change the lights whether you >like it or not. Yes, you *CAN* turn on/off the keyboard leds, but not with Allegro. I did this program a looong time ago, in pascal. It turns NumLock off if its on. Program TurnNumLockOff; Uses Crt; Var NumLock : Integer Absolute $0000: $0417; Begin NumLock := $0070; Delay(1000); NumLock := $0000; end. from what I remember, the 0000:0417 is the seg:offset where the values of the num/caps/scroll/lock keys are stored, so changing the values at that memory location will turn them on/off. Try some different values and you should be able to make them blink :) Offcourse that with djgpp you have to get the 0000:0417 address translated to a 32bit address... extacy/garbage www.catalao.pt/coders/garbage/ ICQ#: 1906060