__________________
		  |
Z-keyboard Handler|
__________________|

Hi!

Thanks for downloading the Z-keyboard handler.
Please keep coming back to the site to see our regular
updates and project progress.

You can find our site @
http://www.gza-wu.freeserve.co.uk

You can also E-mail us @
maz-q@bigfoot.com
gza-wu@gza-wu.freeserve.co.uk
If you want a quicker response then
get us on ICQ (ICQ rocks by the way)
ICQ no.: 5373629  - Gza_wu
ICQ no.: 23420704 - Maz

_________________
	         |
How it all works |
_________________|

Everytime you hit a key a DOS interrupt is called.
This is interrupt 9. The ZKBH changes the Interrupt Vector
table to the address of the new keyboard handler routine.
This means that when you hit a key after installing the ZKBH
the key is processed using the assembler routine that we wrote 
and not the default INT 9 one.

______________
	      |	
Reading a key |
______________|

Whenever a key is pressed the number 1 is stored in an array at
the offset of the key's scancode.
For example the scancode for ESC is 1 so if you wanted to check if 
ESC was being pressed then you would do the following :-

If Zkey%(1) then print "ESC is on!"
'        ^ ESC scancode

This is the same for all of the other keys. The scancodes for them
are shown in the last section. If you are still confused then
check out the Z-KB-demo.BAS - the ZKBH demo program

____________________
		    |
Why bother!?!       |
____________________|

Now, if you have never made a game before then you're probably thinking
why the heck should I go to the bother of installing another keyboard
handler? What is the point?!?
Well, the current keyboard handler accessed through INKEY$ is very..
..well there is no nice way to put it, it is really crap!
If you hold down a key you will be plagued by a horrible beeping sound
which in effect will pause you program, INKEY$ can also only read 1
key at a time making it impossible to control any kind of sprite at 
all!!!!!
ZKBH rids you, the programmer, of all of these problems!
and that is why we use it!

______________
	      |	
The Functions |
______________|

SUB LoadAsm ()

This sub loads the assembley source for the handler
into a string array. NOTE: This must be called before
using any other function!!!!!

SUB Zkbon ()

Turns on the KB handler. This will also dissable QB's saftey
function of CTR-BREAK so you better save your work!
(you also must call Zkboff before the end of you program)

SUB Zkboff ()

Resets the old keyboard handler. Be sure to call this before
your program ends or you will not get back into QB as it waits
for a keystroke while showing the message PRESS ANY KEY TO CONTINUE.

______________
	      |
The Scancodes |
______________|


1  = 	 ESC
2  = 	 1
3  = 	 2
4  = 	 3
5  = 	 4
6  = 	 5
7  = 	 6
8  = 	 7
9  =     9
10 =	 0
11 =	 - or _
12 = 	 = or +
13 = 	 Backspace
14 = 	 Tab
15 = 	 Q
17 = 	 W
18 = 	 E
19 = 	 R
20 =     T
21 = 	 Y
22 = 	 U
23 = 	 I
24 = 	 O
25 = 	 P
26 = 	 [ OR {
27 = 	 ] OR }
28 = 	 Enter
29 = 	 Control 
30 =     A
31 = 	 S
32 = 	 D
33 = 	 F
34 = 	 G
35 = 	 H
36 = 	 J
37 = 	 K
38 = 	 L
39 = 	 ; OR :
40 = 	 ' OR "
41 = 	 \ OR ~
42 = 	 Left Shift
44 = 	 Z
45 = 	 X
46 = 	 C
47 = 	 V
48 = 	 B
49 = 	 N
50 = 	 M
51 = 	 , OR <
52 = 	 . OR >
53 = 	 / OR ?
54 = 	 Right Shift
55 = 	 * or PrintScreen 
56 = 	 ALT
57 = 	 Space
58 = 	 Caps Lock
59 = 	 F1
60 = 	 F2
61 = 	 F3
62 = 	 F4
63 = 	 F5
64 = 	 F6
65 = 	 F7
66 = 	 F8
67 = 	 F9
68 = 	 F10
69 = 	 Num lock
70 = 	 Scroll lock
71 = 	 7 or Home
72 = 	 8 or up
73 = 	 9 or Page up
74 =  	 -
75 = 	 4 or left
76 = 	 5
77 = 	 6 or right
78 = 	 +
79 = 	 1 ot END
80 = 	 2 or down
81 = 	 3 or page down
82 = 	 0 or Insert
83 = 	 . or del
87 = 	 F11
88 = 	 F12

Phew, that was alot of keys!
Well we hope that you enjoy using it, and if you don't mind, mention our
name in your game. (Greg McAusland and Christopher Neill of Exposed Dreams '99)
Thanks a lot!

Bye!