M32:ifholdkey

From EDukeWiki
Revision as of 10:30, 8 May 2022 by Doom64hunter (talk | contribs) (Created page with "ifholdkey <KEY_SC> This command will branch if the key specified by the scancode has been activated, or take the 'else' branch otherwise. Unlike ifhitkey, ifholdkey does not affect the status of the key after the block is exited. See also: ifhitkey '''Usage:''' ifholdkey KEY_F { // do stuff if key active } else { // do stuff if key inactive } // key status is un...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

ifholdkey <KEY_SC>

This command will branch if the key specified by the scancode has been activated, or take the 'else' branch otherwise.

Unlike ifhitkey, ifholdkey does not affect the status of the key after the block is exited.

See also: ifhitkey

Usage:

  ifholdkey KEY_F
  {
     // do stuff if key active
  }
  else
  {
     // do stuff if key inactive
  }
  
  // key status is unchanged