Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - numkey() return the state of the numlock key http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 numkey()            Return the state of the NumLock key
------------------------------------------------------------------------------
 Declaration
   io.hdr

 Syntax
   func logical numkey extern

 Arguments
   None.

 Return
   A logical indicating if the NumLock key is on.

 Description
   numkey() returns the status of the NumLock mode, i. e. if it is active,
   the return value will be .t. , otherwise it will be .f.

 Example
   #define EXAMPLE_IO
   #include example.hdr

   proc Test_numkey
   clear
   cursor( .f. )
   ? "Press the Num Lock key or Esc to finish"
   do while .not. lastkey() == K_ESC
      inkey()
      if numkey()
         @ 0, 70 ?? "Num"
      else
         @ 0, 70 ?? "   "
      endif
   enddo
   endproc

   proc main
   Test_numkey()
   endproc

See Also: altkey() capskey() ctrlkey() insertkey() scrollkey() shiftkey()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson