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 - ctrlkey() return the current status of the ctrl key http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 ctrlkey()           Return the current status of the Ctrl key
------------------------------------------------------------------------------
 Declaration
   io.hdr

 Syntax
   func logical ctrlkey extern

 Arguments
   None.

 Return
   A logical indicating if the Ctrl key is pressed.

 Description
   The ctrlkey() function returns .t. if one of the Ctrl keys is pressed when
   the function is called.

 Example
   #define EXAMPLE_IO
   #include example.hdr

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

   proc main
   Test_ctrlkey()
   endproc

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

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