Thread View: borland.public.cppbuilder.nativeapi
2 messages
2 total messages
Started by Enrico B.
Tue, 04 Mar 2003 08:22
Detecting keyboard "Caps Lock" Led status
Author: Enrico B.
Date: Tue, 04 Mar 2003 08:22
Date: Tue, 04 Mar 2003 08:22
5 lines
1069 bytes
1069 bytes
Hi to all! I am looking for a piece of code to be used to detect the keyboard "Caps Lock" Led status (NOT the key status). Thanks in advance. Henry
Re: Detecting keyboard "Caps Lock" Led status
Author: Remy Lebeau (TeamB)
Date: Tue, 04 Mar 2003 09:26
Date: Tue, 04 Mar 2003 09:26
21 lines
1744 bytes
1744 bytes
The key status *is* the Led status when the Caps lock key is concerned:
GetKeyState
Return Values
If the function succeeds, the return value specifies the status of
the given virtual key. If the high-order bit is 1, the key is down;
otherwise, it is up. If the low-order bit is 1, the key is toggled. A key,
such as the CAPS LOCK key, is toggled if it is turned on. The key is off and
untoggled if the low-order bit is 0. A toggle key's indicator light (if any)
on the keyboard will be on when the key is toggled, and off when the key is
untoggled.
Gambit
"Enrico B." <eangelo@libero.it> wrote in message
news:3e645f60$1@newsgroups.borland.com...
> I am looking for a piece of code to be used to detect
> the keyboard "Caps Lock" Led status (NOT the key status).
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads