Files
BlitzNext/#Test/help/commands/2d_commands/KeyDown.htm
T

49 lines
1.1 KiB
HTML

<html>
<head>
<title>Blitz3D Docs</title>
<link rel=stylesheet href=../css/commands.css type=text/css>
</head>
<body>
<h1>KeyDown (scancode)</h1>
<h1>Parameters</h1>
<table>
<tr>
<td>
scancode = corresponding key scancode
</td>
</tr>
</table>
<h1>Description</h1>
<table>
<tr>
<td>
This command (similar to its counterparts MouseDown and JoyDown) is used to detect if a key is being held down. This command returns a 0 if the key is not held down, a 1 if the key is held down.
<br />
<br />
See Also: ScanCodes
</td>
</tr>
</table>
<h1><a href=../2d_examples/KeyDown.bb>Example</a></h1>
<table>
<tr>
<td>
; KeyDown() example
<br />
<br />
Print "Hold down ENTER key!"
<br />
Delay 3000
<br />
While Not KeyHit(1)
<br />
If KeyDown(28) Then
<br />
Print "Enter is being pressed!"
<br />
Else
<br />
Print
<br />
End If
<br />
Wend
</td>
</tr>
</table>
<br>
<a target=_top href=../index.htm>Index</a><br>
<br>
Click <a href=http://www.blitzbasic.co.nz/b3ddocs/command.php?name=KeyDown&ref=comments target=_blank>here</a> to view the latest version of this page online</body>
</html>