Re: How to read from Keyboard

> Of course, all this assumes you aren’t using a keyboard switch.
Of course not.
The target market is very specific, and in actuality my own example (“DEAr
santa”) is irrelevant.
I discarded the marketeers’ request (so Max, not to bother, if your children
or grandchildren will ever hit the product, it will have two statuses -
LED’s and the internal one - in sync) but created a research topic for
myself, how whould I do it if it were a showstopper.

Now I have a solution (sh-sh-sh, marketeers are listening) without any
kernel stuff at all, based upon:
(1) a codeguru sample,
(2) Doron’s info and
(3) WMI.

Thank you all guys. Let’s have a holiday, for a change.

----- Original Message -----
From: “Loren Wilton”
To: “Windows System Software Devs Interest List”
Sent: Sunday, December 25, 2005 4:25 PM
Subject: Re: [ntdev] How to read from Keyboard

>> Plus, of course, I set LED’s states correctly when blinking is over.
>> This is what the sample UM code does, and that’s what I already do.
>> If interested, see
>> http://www.codeguru.com/Cpp/W-P/system/keyboard/article.php/c2825
>> or I can send you my version.
>
> Of course, all this assumes you aren’t using a keyboard switch. If you
> are,
> and the led state is wrong when the user switches to another machine, it
> will be faithfully restored to the wrong state when you switch back to the
> machine your code is on, even though you sent out the (ignored) command to
> swizzle the lights back.
>
> I think I really have to agree with Maxim here. Yes, you can do this.
> Yes,
> it might be (if you are very bored) an interesting learning excercise to
> figure out how to do it - safely. “Safely”, not “right”. Because by
> definition
this cannot be done “right”. The “right” way to do it is to
> NOT
> DO IT.
>
> Basically if you have a download manager, you business is to do a
> download.
> Now, there is nothing against a progress display. If it is a dialog
> window,
> it damn well better have a minimize button on it, and it damn double damn
> well better not be sysmodal or expand to cover the entire screen. If it
> does either of those things, rest assured that it will never complete any
> download longer than about 6.3 seconds on my machines, and will be removed
> (if a reinstall of the OS is required, it will be done), and not only it,
> but ALL SOFTWARE FROM YOUR COMPANY WILL BE FOREVER BANNED. I conside
> “clever” hacks like that to be virui of the worst sort. Furthermore, I
> assume that anyone that would do stupid tricks like that has my worst
> interests at heart, and intends me and my computer harm. If they didn’t,
> why would they do such aggravating things?
>
> Now, you can claim that fiddling the caps lock indicator isn’t that
> annoying. True; it isn’t. It is equivalent to the polite little dialog
> that takes a quarter of the screen and STILL doesn’t allow itself to be
> minimized. That will be removed from my system too. Although I might
> allow
> it to complete ONE download, IF the code it is downloading doesn’t appear
> to
> be from the same company. It won’t start, much less ever complete, a
> second
> activation.
>
> If you REALLY feel the ABSOLUTE NEED for some sort of active “you damn
> well
> can’t ignore this!” progress indicator, go back to CodeGuru and search for
> “systray”. Find out how to do an animated tray icon.
>
> BTW, PROVIDE A SWITCH in your software to turn this off. And DO NOT turn
> on
> a “ding at the end of download” as the mandatory optional ‘feature’ if the
> user disables the tray icon. Download managers are BACKGROUND software.
> They ARE NOT the most important thing I’m doing. I’ll go look at their
> status when I want to, not when THEY WANT ME TO. If I really want to
> know
> the progress, I’ll leave the progess dialog up. That is what is there
> for.
> It is also My Choice to do it or not.
>
> Nothing like a good Christmas rant to get the blood flowing!
>
> Loren
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@bellsouth.net
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>

Hey, Loren, teach me the trick! I tried it a few times, and I
couldn’t make it work, I finally got myself a separate
display/keyboard/mouse and the problem went away. I may actually
try the Apex switch, because, as you say, scroll-lock switching
can be a bit erratic at times.

Alberto.

----- Original Message -----
From: “Loren Wilton”
To: “Windows System Software Devs Interest List”

Sent: Sunday, December 25, 2005 3:40 PM
Subject: Re: [ntdev] How to read from Keyboard

>> Now, if you want a less than satisfactory
>> experience, you can install Windbg on two systems, connect
>> them
>> with a serial or a 1394 cable, and then try to drive the
>> system
>> from a common keyboard, mouse and display using the scroll
>> lock
>> key! It’s not for the fainthearted, that’s the least I can
>> say,
>> I don’t think either Windbg or Windows turn very happy about
>> it.
>
> I do this all the time. Never had a problem with it.
>
> BTW, Apex switches use a single click of the SysReq key rather
> than banging
> repeatedly on the Scroll Lock key until the stupid switch
> FINALLY decides
> that you have met its timing requirements and will beep at
> you. MUCH nicer
> interface!
>
> Loren
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@ieee.org
> To unsubscribe send a blank email to
> xxxxx@lists.osr.com

> I discarded the marketeers’ request

Good. Un-qualified software marketeers/project managers are a plague of the
modern days :slight_smile:

(so Max, not to bother, if your children
or grandchildren will ever hit the product

No, such things are irritating for the professionals too :slight_smile:

LED’s and the internal one - in sync) but created a research topic for
myself

OK, then the Doron’s suggestion seems to be a good idea - filter driver sending
the “set LEDs” IOCTL down.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com