| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <html>
- <head>
- <title>Blitz3D Docs</title>
- <link rel=stylesheet href=../css/commands.css type=text/css>
- </head>
- <body>
- <h1>KeyHit (scancode)</h1>
- <h1>Parameters</h1>
- <table>
- <tr>
- <td>
- scancode = the scancode for the key to test
- </td>
- </tr>
- </table>
- <h1>Description</h1>
- <table>
- <tr>
- <td>
- This command returns the number of times a specified key has been hit since the last time you called the KeyHit() command. Check the ScanCodes for a complete listing of scancodes.
- </td>
- </tr>
- </table>
- <h1><a href=../2d_examples/KeyHit.bb>Example</a></h1>
- <table>
- <tr>
- <td>
- ; KeyHit Example
<br />
-
<br />
- ; Set up the timer
<br />
- current=MilliSecs()
<br />
- Print "Press ESC a bunch of times for five seconds..."
<br />
-
<br />
- ; Wait 5 seconds
<br />
- While MilliSecs() < current+5000
<br />
- Wend
<br />
-
<br />
- ; Print the results
<br />
- Print "Pressed ESC " + KeyHit(1) + " times."
<br />
- </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=KeyHit&ref=comments target=_blank>here</a> to view the latest version of this page online</body>
- </html>
|