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

 Syntax
   func logical altkey extern

 Arguments
   None.

 Return
   A logical indicating that the Alt key is pressed.

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

 Example
   #define EXAMPLE_IO
   #include example.hdr

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

   proc main
   Test_altkey()
   endproc

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

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