Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FUNCky - <b>name:</b> <b>kbdstat() - get status of shift/num/caps/scroll/alt keys</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Name:     kbdstat() - get status of shift/num/caps/scroll/alt keys
  Usage:    <logical> = kbdstat(<keyvalue>)
  Params:   integer <keyvalue> - a number denoting which key state you
            want to check based on the following table.

                 KEYVALUE  - MEANING
                 128       - insert
                 64        - caps lock
                 32        - num lock
                 16        - scroll lock
                 8         - alt key
                 4         - ctrl key
                 2         - left shift key
                 1         - right shift key

  Returns:  .T. if the specified key is depressed, .F. if not.

 ---------------------------------- Example ---------------------------------

                 ? "Press NumLock to popup the calculator"
                 do while .T.
                      if kbdstat(32)
                           do popcalc
                      endif
                 enddo

                 ? "Press scroll lock to move the window"

                 do while kbdstat(16)
                      if (inkey() = 19)
                           do MOVELEFT
                      elseif (inkey() = 4)
                           do MOVERIGHT
                      endif
                 enddo


See Also: isextended() waitkey() capslock() numlock() scrlock()

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