SpaceKey
State = SpaceKey()
 
Parameters: NONE
Returns:

    State = The state of the key (0= up, 1 = pressed)
 

      The SpaceKey() function with return the state of SPACE key on your keyboard.

      Since the SPACE key is commonly used as game controls, it has it's own dedicated command. Purely to make things it easy to remember and your code easier to read.

      If the key is being pressed the function will return a value of 1 (True), however if it's not being pressed, it will return a zero.



FACTS:


      * None



Mini Tutorial:


      This example shows how To Read the various common keys.

  
  Do
     Cls RGB(0,0,0)
     
   ; Display the Status of the SPACE and ENTER keys
     
     Print "Space Key State:"+Str$(SpaceKey())
     Print "Enter Key State:"+Str$(EnterKey())
     
     
   ; Display the Screen and wait for the user to press a key
     Sync
  Loop
  
  




 
Related Info: Inkey$ | KeyState | Scancode :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com