hey there..can you please help me write a C program to put the Caps Lock on??
cool_zephyr
7
Junior Poster in Training
Recommended Answers
Jump to PostHere's a small snippet to turn on the Caps-Lock.
#include <windows.h> int main() { if ( !GetKeyState(VK_CAPITAL) & 1 ) { // If caps lock is off, simulate keypress keybd_event( VK_CAPITAL, 0, KEYEVENTF_EXTENDEDKEY, 0 ); keybd_event( VK_CAPITAL, 0, KEYEVENTF_KEYUP, 0 ); } return 0; }
Hope this …
All 4 Replies
William Hemsworth
1,339
Posting Virtuoso
GraphicEq
0
Newbie Poster
cool_zephyr
7
Junior Poster in Training
Salem
5,138
Posting Sage
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.