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>putkey() - simulate a keypress by stuffing value into lastkey()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Name:     putkey() - simulate a keypress by stuffing value into lastkey()
  Usage:    putkey(<keyvalue>)
  Params:   integer <keyvalue> - the inkey() value of the key to simulate
  Returns:  nothing

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

                    ? inkey()
                    ? lastkey()
                    * prints 0, 0

                    putkey(27)

                    ? lastkey()
                    * prints 27

  Note:    This function was added so that you can write programs for
           either the mouse or keyboard. If a mouse action simulates
           a keyboard action, you can simulate the keyboard action
           with putkey(), thereby enabling you to provide dual mode
           programs with less programming. All it does it insert the
           key value you specify into the memory area used by the
           lastkey() function.

See Also: nstuff() strstuff()

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