Hi,
Is there any way in kernel mode driver to check the status of capslock
key and turn off if it is ON?

I thought of accessing Bios address space 40h:17h for this purpose.
But I don't know how to do that in Kernel mode.

Please help on how to access 40h:17h address from kernel mode driver.
Any other way to do the thing also welcome. I am a newbie.

Thanks,
Krishna

Re: Switch off Caps Lock from kernel mode driver by Robert

Robert
Tue Oct 11 22:51:10 CDT 2005

Krishna wrote:
> Hi,
> Is there any way in kernel mode driver to check the status of capslock
> key and turn off if it is ON?
>
> I thought of accessing Bios address space 40h:17h for this purpose.
> But I don't know how to do that in Kernel mode.
>
> Please help on how to access 40h:17h address from kernel mode driver.
> Any other way to do the thing also welcome. I am a newbie.
>
> Thanks,
> Krishna

The CapsLock status is a status of the OS and no driver should mess
around with it. Why do you want to change it at all?

Re: Switch off Caps Lock from kernel mode driver by Krishna

Krishna
Thu Oct 13 02:20:01 CDT 2005

Hi,
I am generating keyboard events from kernel mode driver. But in case if
caps lock is on , the charcters generated becomes inverted due to caps lock.
So I need to switch off caps lock before generating keyboard events from
kernel mode.
please help on this.

thanx,
Krish



"Robert Marquardt" wrote:

> Krishna wrote:
> > Hi,
> > Is there any way in kernel mode driver to check the status of capslock
> > key and turn off if it is ON?
> >
> > I thought of accessing Bios address space 40h:17h for this purpose.
> > But I don't know how to do that in Kernel mode.
> >
> > Please help on how to access 40h:17h address from kernel mode driver.
> > Any other way to do the thing also welcome. I am a newbie.
> >
> > Thanks,
> > Krishna
>
> The CapsLock status is a status of the OS and no driver should mess
> around with it. Why do you want to change it at all?
>

Re: Switch off Caps Lock from kernel mode driver by conjonh

conjonh
Thu Oct 13 04:19:10 CDT 2005

Take a look at this code and example,
http://www.sysinternals.com/Utilities/Ctrl2Cap.html

You should be able to tailor it to turn off caps lock in the
ReadComplete Function
so if the key stroke happens you look at its Scancode values and if its
caps lock then
ignore it!

Cheers,
Con


Re: Switch off Caps Lock from kernel mode driver by Robert

Robert
Thu Oct 13 05:20:53 CDT 2005

Krishna wrote:
> Hi,
> I am generating keyboard events from kernel mode driver. But in case if
> caps lock is on , the charcters generated becomes inverted due to caps lock.
> So I need to switch off caps lock before generating keyboard events from
> kernel mode.
> please help on this.

What do you want to achieve with the keyboard events?
Tell what action you want to trigger. It is generally a bad idea to try
to trigger the action with fake keyboard keys.