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 - __last_key last key code http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 __last_key          Last key code
------------------------------------------------------------------------------
 Declaration
   io.hdr

 Syntax
   uint __last_key

 Default
   0 (no key pressed).

 Description
   The __last_key system variable contains the key code of the last
   keypress. The lastkey() function returns the value of __last_key.

 Example
   #define EXAMPLE_IO
   #include example.hdr

   proc Test_last_key
   vardef
      uint uKey
   enddef
   ? "Press keys, finish with Escape"
   ?
   ? "    lastkey() __last_key"
   ? "=============================="
   do while .t.
      uKey := getkey()
      if uKey == K_ESC
         exit
      endif
      ? lastkey(), __last_key      // equal values
   enddo
   endproc

   proc main
   Test_last_key()
   endproc

See Also: lastkey()

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