blitzkeyslib
In Blitz mode the system does not read the keyboard for the program.
BlitzKeys On makes the library the input of the program, so that
Inkey$ returns the keys typed, read straight from the keyboard’s
buffer. RawStatus tells whether a single key is held down at this
moment, which suits games better:
BLITZ
BlitzKeys On
Repeat
VWait
If RawStatus($4F) Then x-1
If RawStatus($4E) Then x+1
Until RawStatus($45)RawStatus takes the raw key code of a key, the number of its place
on the keyboard. Some of them:
| Key | Code | Key | Code | Key | Code |
|---|---|---|---|---|---|
| Esc | $45 | Space | $40 | Return | $44 |
| F1 to F10 | $50 to $59 | Cursor up, down | $4C, $4D | Cursor right, left | $4E, $4F |
| Left Shift | $60 | Right Shift | $61 | Ctrl | $63 |
| Left Alt | $64 | Right Alt | $65 | Left, right Amiga | $66, $67 |
| 1 to 9, 0 | $01 to $0A | Q W E R T Y | $10 to $15 | A S D F G H | $20 to $25 |
Based on the blitzkeyslib guide by Acid Software.
Library number 98.
Commands
BlitzKey
The next key typed, as Inkey$ returns it after BlitzKeys On; the value -1 if no key is waiting.
Function, result .w. Help text: ;same as inkey$ after a bitmapinput
No arguments.
BlitzKeys
With On, Inkey$ reads the keyboard in Blitz mode; with Off, the input goes back to what it was before On. Blitz mode only.
Statement. Help text: On|Off
Arguments: .w
If the program chose another input after On, for example with
FileInput, Off keeps that input.
BlitzQualifier
The qualifier keys, such as Shift, Alt and Ctrl, that were held down with the last key read in Blitz mode, as the bits of the system’s qualifier word.
Function, result .w. No help text.
No arguments.
BlitzRepeat
Meant to set the delay and the speed of the key repeat in Blitz mode; it does nothing.
Statement. Help text: Delay,Speed
Arguments: .w, .w
HandleRawKey
Does nothing; the library has no code for it.
Statement. No help text.
No arguments.
RawStatus
True (-1) if the key with the raw key code given is held down, else false (0).
Function, result .w. Help text: (Rawkey)
Arguments: .w