Contains a standard AT keyboard driver
Marcel Sondaar
Public Domain
quickkey.bas | Contains a standard AT keyboard driver |
Variables | |
buttons | Stores the up/down values for all of the keys |
keycodes | Stores the last 64 keyboard events |
lastkeycounter | Stores the keypress counter |
LastRead | Stores the last byte read from the keyboard controller |
Keymap: | Stores the mapping of keys |
Functions | |
ReadKeyboard | reads a keypress from the kbc and adjusts the state accordingly |
ReadKey | Waits for a keypress, then returns the associated character. |
Function ReadKeyboard() As Unsigned Byte
reads a keypress from the kbc and adjusts the state accordingly
a byte is read and acknowledged, and if it equals e0, another byte is read and acked. then the msb of the last byte is set it is a release, and if its clear its a press the presence of e0 tells us wether it is an extended key or not.
Stores the up/down values for all of the keys
Dim Shared buttons( to 255 ) As Long
Stores the last 64 keyboard events
Dim Shared keycodes( to 63 ) As Long
Stores the keypress counter
Dim Shared lastkeycounter As Long
Stores the last byte read from the keyboard controller
Dim Shared LastRead As Unsigned Byte
reads a keypress from the kbc and adjusts the state accordingly
Function ReadKeyboard() As Unsigned Byte
Waits for a keypress, then returns the associated character.
Function ReadKey() As Byte