WindowsKeys
State = WindowsKeys(KeySelector)
 
Parameters:

    KeySelector = Flag to select if BOTH or only the LEFT or RIGHT keys are checked
Returns:

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

      The WindowsKeys() function will return the state of either WINDOWS key upon your keyboard.

      Since these keys are commonly used as game controls, they have their own dedicated command. Purely to make things easy to remember and your code easier to read.

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

Key Selector Flags:

      0 = Return the state of either LEFT/RIGHT or Key
      1 = Return the state of only the LEFT Key
      2 = Return the state of only the RIGHT Key




FACTS:


      * Windows XP users should note that using pressing SHIFT key a number of times can envoke Windows Sticky Key settings.



Mini Tutorial:


      This example shows how To Read the various common keys.

  
  Do
     Cls RGB(0,0,0)
     
   ; Display the Status of the WINDOW keys
     Print "Combined WINDOWS Key State:"+Str$(WindowsKeys(0))
     Print "Left WINDOW State:"+Str$(WindowsKeys(1))
     Print "Right WINDOW State:"+Str$(WindowsKeys(2))
     
   ; Display the Screen and wait for the user to press a key
     Sync
  Loop
  
  




 
Related Info: ALtKeys | BreakKey | CtrlKeys | Downkey | EnterKey | Esckey | FunctionKeys | Inkey$ | Input | KeyBoardState | KeyState | Leftkey | Mouse | Rightkey | Scancode | Upkey :
 


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