getting caps, num, and scroll lock state

This is a discussion on getting caps, num, and scroll lock state within the Windows Programming forums, part of the Platform Specific Boards category; I'm trying to create an Edit type program using the Win32 API and C in the console. What function(s) and ...

  1. #1
    Registered User
    Join Date
    Aug 2001
    Posts
    380

    getting caps, num, and scroll lock state

    I'm trying to create an Edit type program using the Win32 API and C in the console.

    What function(s) and how would I use them to get the state of Caps Lock, Num Lock, and Scroll Lock?

    Is the code something like the code below?

    Code:
    if(GetAsyncKeyState(VK_CAPITAL))
      Caps Lock is toggled
    else
      Caps Lock is untoggle
    Thanks
    Don't you dare hit me on the head, you know I'm not normal.
    A Stooge Site
    Green Frog Software

  2. #2
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Controlling keyboard LED
    By maxorator in forum Windows Programming
    Replies: 3
    Last Post: 09-05-2006, 11:28 AM
  2. ioctl and keyboard leds
    By EnC in forum Linux Programming
    Replies: 1
    Last Post: 04-23-2003, 09:46 AM
  3. How do you toggle keys like Scroll lock without Windows API?
    By animeaholic in forum C++ Programming
    Replies: 7
    Last Post: 09-15-2002, 08:02 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21