Number lock

Kim Martel kim at martel.com.au
Mon May 24 08:13:19 UTC 2021


Hi Kelly
Thankyou - that was what I was after. It works.

My next thought is there a command that if result=0 that you can
automatically set result to 1

Regards
Kim

-----Original Message-----
From: omnisdev-en [mailto:omnisdev-en-bounces at lists.omnis-dev.com] On Behalf
Of Kelly Burgess
Sent: Monday, 24 May 2021 1:10 PM
To: OmnisList <omnisdev-en at lists.omnis-dev.com>
Subject: Re: Number lock

Hi Kim,

Assuming you're on Windows, try this.  I don't have a keyboard with a
numLock key, but this detects my capsLock key (code 20).  144 is the numLock
code.

   Register DLL ('user32','GetKeyState','JJ') Returns err
   Call DLL ('user32','GetKeyState',144) Returns result
   If result=0
      ; numlock key not pressed
   Else if result=1
      ; numlock key pressed
   End if

Kelly
_____________________________________________________________
Manage your list subscriptions at http://lists.omnis-dev.com Start a new
message -> mailto:omnisdev-en at lists.omnis-dev.com 


-- 
This email has been checked for viruses by AVG.
https://www.avg.com



More information about the omnisdev-en mailing list