Products Applications Downloads Features Wiki forum Store

keystate()

From Wiki077
Jump to: navigation, search


float keystate (string key)

This function will return the current state of the key. Return values are 1 or 0, with 1 meaning the key is pressed, 0 meaning it is not. key can be:

  • A through Z, and a through z
  • 0 through 9
  • space
  • enter
  • left
  • right
  • up
  • down
  • shift
  • alt
  • ctrl
  • F1 through F12

Note: All parameters to this function are case insensitive. For example keystate("a") always returns the same value as keystate("A").


Examples

keystate("K")
keystate("shift")
keystate("F7")

See Also

mouse() Keyboard CHOP

Personal tools