Loading ...
Sorry, an error occurred while loading the content.

get NUMLOCK status

Expand Messages
  • dukestefjen
    Is there any way to get the NUMLOCK keyboard status, So that I only use SendKeys( {NUMLOCK} ) when its already on?
    Message 1 of 3 , Mar 12, 2007
    • 0 Attachment
      Is there any way to get the NUMLOCK keyboard status, So that I only
      use SendKeys("{NUMLOCK}") when its already on?
    • Monica Cohen
      You can use the GetNumLock() function from Win32::KeyState module. ... [Non-text portions of this message have been removed]
      Message 2 of 3 , Mar 12, 2007
      • 0 Attachment
        You can use the GetNumLock() function from Win32::KeyState module.


        On 12 Mar 2007 04:25:30 -0700, dukestefjen <jmvt@...> wrote:
        >
        > Is there any way to get the NUMLOCK keyboard status, So that I only
        > use SendKeys("{NUMLOCK}") when its already on?
        >
        >
        >


        [Non-text portions of this message have been removed]
      • jonnyroberts1978
        This should work Win32::API- Import( user32 , GetKeyState , I , I ); print GetKeyState(0x90) & 1;
        Message 3 of 3 , Mar 12, 2007
        • 0 Attachment
          This should work

          Win32::API->Import('user32', 'GetKeyState', 'I', 'I');

          print GetKeyState(0x90) & 1;

          --- In perlguitest@yahoogroups.com, "dukestefjen" <jmvt@...> wrote:
          >
          > Is there any way to get the NUMLOCK keyboard status, So that I only
          > use SendKeys("{NUMLOCK}") when its already on?
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.