xref: /OK3568_Linux_fs/kernel/Documentation/input/devices/atarikbd.rst (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun====================================
2*4882a593SmuzhiyunIntelligent Keyboard (ikbd) Protocol
3*4882a593Smuzhiyun====================================
4*4882a593Smuzhiyun
5*4882a593Smuzhiyun
6*4882a593SmuzhiyunIntroduction
7*4882a593Smuzhiyun============
8*4882a593Smuzhiyun
9*4882a593SmuzhiyunThe Atari Corp. Intelligent Keyboard (ikbd) is a general purpose keyboard
10*4882a593Smuzhiyuncontroller that is flexible enough that it can be used in a variety of
11*4882a593Smuzhiyunproducts without modification. The keyboard, with its microcontroller,
12*4882a593Smuzhiyunprovides a convenient connection point for a mouse and switch-type joysticks.
13*4882a593SmuzhiyunThe ikbd processor also maintains a time-of-day clock with one second
14*4882a593Smuzhiyunresolution.
15*4882a593SmuzhiyunThe ikbd has been designed to be general enough that it can be used with a
16*4882a593Smuzhiyunvariety of new computer products. Product variations in a number of
17*4882a593Smuzhiyunkeyswitches, mouse resolution, etc. can be accommodated.
18*4882a593SmuzhiyunThe ikbd communicates with the main processor over a high speed bi-directional
19*4882a593Smuzhiyunserial interface. It can function in a variety of modes to facilitate
20*4882a593Smuzhiyundifferent applications of the keyboard,  joysticks, or mouse. Limited use of
21*4882a593Smuzhiyunthe controller is possible in applications in which only a unidirectional
22*4882a593Smuzhiyuncommunications medium is available by carefully designing the default modes.
23*4882a593Smuzhiyun
24*4882a593SmuzhiyunKeyboard
25*4882a593Smuzhiyun========
26*4882a593Smuzhiyun
27*4882a593SmuzhiyunThe keyboard always returns key make/break scan codes. The ikbd generates
28*4882a593Smuzhiyunkeyboard scan codes for each key press and release. The key scan make (key
29*4882a593Smuzhiyunclosure) codes start at 1, and are defined in Appendix A. For example, the
30*4882a593SmuzhiyunISO key position in the scan code table should exist even if no keyswitch
31*4882a593Smuzhiyunexists in that position on a particular keyboard. The break code for each key
32*4882a593Smuzhiyunis obtained by ORing 0x80 with the make code.
33*4882a593Smuzhiyun
34*4882a593SmuzhiyunThe special codes 0xF6 through 0xFF are reserved for use as follows:
35*4882a593Smuzhiyun
36*4882a593Smuzhiyun=================== ====================================================
37*4882a593Smuzhiyun    Code            Command
38*4882a593Smuzhiyun=================== ====================================================
39*4882a593Smuzhiyun    0xF6            status report
40*4882a593Smuzhiyun    0xF7            absolute mouse position record
41*4882a593Smuzhiyun    0xF8-0xFB       relative mouse position records (lsbs determined by
42*4882a593Smuzhiyun                    mouse button states)
43*4882a593Smuzhiyun    0xFC            time-of-day
44*4882a593Smuzhiyun    0xFD            joystick report (both sticks)
45*4882a593Smuzhiyun    0xFE            joystick 0 event
46*4882a593Smuzhiyun    0xFF            joystick 1 event
47*4882a593Smuzhiyun=================== ====================================================
48*4882a593Smuzhiyun
49*4882a593SmuzhiyunThe two shift keys return different scan codes in this mode. The ENTER key
50*4882a593Smuzhiyunand the RETurn key are also distinct.
51*4882a593Smuzhiyun
52*4882a593SmuzhiyunMouse
53*4882a593Smuzhiyun=====
54*4882a593Smuzhiyun
55*4882a593SmuzhiyunThe mouse port should be capable of supporting a mouse with resolution of
56*4882a593Smuzhiyunapproximately 200 counts (phase changes or 'clicks') per inch of travel. The
57*4882a593Smuzhiyunmouse should be scanned at a rate that will permit accurate tracking at
58*4882a593Smuzhiyunvelocities up to 10 inches per second.
59*4882a593SmuzhiyunThe ikbd can report mouse motion in three distinctly different ways. It can
60*4882a593Smuzhiyunreport relative motion, absolute motion in a coordinate system maintained
61*4882a593Smuzhiyunwithin the ikbd, or by converting mouse motion into keyboard cursor control
62*4882a593Smuzhiyunkey equivalents.
63*4882a593SmuzhiyunThe mouse buttons can be treated as part of the mouse or as additional
64*4882a593Smuzhiyunkeyboard keys.
65*4882a593Smuzhiyun
66*4882a593SmuzhiyunRelative Position Reporting
67*4882a593Smuzhiyun---------------------------
68*4882a593Smuzhiyun
69*4882a593SmuzhiyunIn relative position mode, the ikbd will return relative mouse position
70*4882a593Smuzhiyunrecords whenever a mouse event occurs. A mouse event consists of a mouse
71*4882a593Smuzhiyunbutton being pressed or released, or motion in either axis exceeding a
72*4882a593Smuzhiyunsettable threshold of motion. Regardless of the threshold, all bits of
73*4882a593Smuzhiyunresolution are returned to the host computer.
74*4882a593SmuzhiyunNote that the ikbd may return mouse relative position reports with
75*4882a593Smuzhiyunsignificantly more than the threshold delta x or y. This may happen since no
76*4882a593Smuzhiyunrelative mouse motion events will be generated: (a) while the keyboard has
77*4882a593Smuzhiyunbeen 'paused' ( the event will be stored until keyboard communications is
78*4882a593Smuzhiyunresumed) (b) while any event is being transmitted.
79*4882a593Smuzhiyun
80*4882a593SmuzhiyunThe relative mouse position record is a three byte record of the form
81*4882a593Smuzhiyun(regardless of keyboard mode)::
82*4882a593Smuzhiyun
83*4882a593Smuzhiyun    %111110xy           ; mouse position record flag
84*4882a593Smuzhiyun                        ; where y is the right button state
85*4882a593Smuzhiyun                        ; and x is the left button state
86*4882a593Smuzhiyun    X                   ; delta x as twos complement integer
87*4882a593Smuzhiyun    Y                   ; delta y as twos complement integer
88*4882a593Smuzhiyun
89*4882a593SmuzhiyunNote that the value of the button state bits should be valid even if the
90*4882a593SmuzhiyunMOUSE BUTTON ACTION has set the buttons to act like part of the keyboard.
91*4882a593SmuzhiyunIf the accumulated motion before the report packet is generated exceeds the
92*4882a593Smuzhiyun+127...-128 range, the motion is broken into multiple packets.
93*4882a593SmuzhiyunNote that the sign of the delta y reported is a function of the Y origin
94*4882a593Smuzhiyunselected.
95*4882a593Smuzhiyun
96*4882a593SmuzhiyunAbsolute Position reporting
97*4882a593Smuzhiyun---------------------------
98*4882a593Smuzhiyun
99*4882a593SmuzhiyunThe ikbd can also maintain absolute mouse position. Commands exist for
100*4882a593Smuzhiyunresetting the mouse position, setting X/Y scaling, and interrogating the
101*4882a593Smuzhiyuncurrent mouse position.
102*4882a593Smuzhiyun
103*4882a593SmuzhiyunMouse Cursor Key Mode
104*4882a593Smuzhiyun---------------------
105*4882a593Smuzhiyun
106*4882a593SmuzhiyunThe ikbd can translate mouse motion into the equivalent cursor keystrokes.
107*4882a593SmuzhiyunThe number of mouse clicks per keystroke is independently programmable in
108*4882a593Smuzhiyuneach axis. The ikbd internally maintains mouse motion information to the
109*4882a593Smuzhiyunhighest resolution available, and merely generates a pair of cursor key events
110*4882a593Smuzhiyunfor each multiple of the scale factor.
111*4882a593SmuzhiyunMouse motion produces the cursor key make code immediately followed by the
112*4882a593Smuzhiyunbreak code for the appropriate cursor key. The mouse buttons produce scan
113*4882a593Smuzhiyuncodes above those normally assigned for the largest envisioned keyboard (i.e.
114*4882a593SmuzhiyunLEFT=0x74 & RIGHT=0x75).
115*4882a593Smuzhiyun
116*4882a593SmuzhiyunJoystick
117*4882a593Smuzhiyun========
118*4882a593Smuzhiyun
119*4882a593SmuzhiyunJoystick Event Reporting
120*4882a593Smuzhiyun------------------------
121*4882a593Smuzhiyun
122*4882a593SmuzhiyunIn this mode, the ikbd generates a record whenever the joystick position is
123*4882a593Smuzhiyunchanged (i.e. for each opening or closing of a joystick switch or trigger).
124*4882a593Smuzhiyun
125*4882a593SmuzhiyunThe joystick event record is two bytes of the form::
126*4882a593Smuzhiyun
127*4882a593Smuzhiyun    %1111111x           ; Joystick event marker
128*4882a593Smuzhiyun                        ; where x is Joystick 0 or 1
129*4882a593Smuzhiyun    %x000yyyy           ; where yyyy is the stick position
130*4882a593Smuzhiyun                        ; and x is the trigger
131*4882a593Smuzhiyun
132*4882a593SmuzhiyunJoystick Interrogation
133*4882a593Smuzhiyun----------------------
134*4882a593Smuzhiyun
135*4882a593SmuzhiyunThe current state of the joystick ports may be interrogated at any time in
136*4882a593Smuzhiyunthis mode by sending an 'Interrogate Joystick' command to the ikbd.
137*4882a593Smuzhiyun
138*4882a593SmuzhiyunThe ikbd response to joystick interrogation is a three byte report of the form::
139*4882a593Smuzhiyun
140*4882a593Smuzhiyun    0xFD                ; joystick report header
141*4882a593Smuzhiyun    %x000yyyy           ; Joystick 0
142*4882a593Smuzhiyun    %x000yyyy           ; Joystick 1
143*4882a593Smuzhiyun                        ; where x is the trigger
144*4882a593Smuzhiyun                        ; and yyy is the stick position
145*4882a593Smuzhiyun
146*4882a593SmuzhiyunJoystick Monitoring
147*4882a593Smuzhiyun-------------------
148*4882a593Smuzhiyun
149*4882a593SmuzhiyunA mode is available that devotes nearly all of the keyboard communications
150*4882a593Smuzhiyuntime to reporting the state of the joystick ports at a user specifiable rate.
151*4882a593SmuzhiyunIt remains in this mode until reset or commanded into another mode. The PAUSE
152*4882a593Smuzhiyuncommand in this mode not only stop the output but also temporarily stops
153*4882a593Smuzhiyunscanning the joysticks (samples are not queued).
154*4882a593Smuzhiyun
155*4882a593SmuzhiyunFire Button Monitoring
156*4882a593Smuzhiyun----------------------
157*4882a593Smuzhiyun
158*4882a593SmuzhiyunA mode is provided to permit monitoring a single input bit at a high rate. In
159*4882a593Smuzhiyunthis mode the ikbd monitors the state of the Joystick 1 fire button at the
160*4882a593Smuzhiyunmaximum rate permitted by the serial communication channel. The data is packed
161*4882a593Smuzhiyun8 bits per byte for transmission to the host. The ikbd remains in this mode
162*4882a593Smuzhiyununtil reset or commanded into another mode. The PAUSE command in this mode not
163*4882a593Smuzhiyunonly stops the output but also temporarily stops scanning the button (samples
164*4882a593Smuzhiyunare not queued).
165*4882a593Smuzhiyun
166*4882a593SmuzhiyunJoystick Key Code Mode
167*4882a593Smuzhiyun----------------------
168*4882a593Smuzhiyun
169*4882a593SmuzhiyunThe ikbd may be commanded to translate the use of either joystick into the
170*4882a593Smuzhiyunequivalent cursor control keystroke(s). The ikbd provides a single breakpoint
171*4882a593Smuzhiyunvelocity joystick cursor.
172*4882a593SmuzhiyunJoystick events produce the make code, immediately followed by the break code
173*4882a593Smuzhiyunfor the appropriate cursor motion keys. The trigger or fire buttons of the
174*4882a593Smuzhiyunjoysticks produce pseudo key scan codes above those used by the largest key
175*4882a593Smuzhiyunmatrix envisioned (i.e. JOYSTICK0=0x74, JOYSTICK1=0x75).
176*4882a593Smuzhiyun
177*4882a593SmuzhiyunTime-of-Day Clock
178*4882a593Smuzhiyun=================
179*4882a593Smuzhiyun
180*4882a593SmuzhiyunThe ikbd also maintains a time-of-day clock for the system. Commands are
181*4882a593Smuzhiyunavailable to set and interrogate the timer-of-day clock. Time-keeping is
182*4882a593Smuzhiyunmaintained down to a resolution of one second.
183*4882a593Smuzhiyun
184*4882a593SmuzhiyunStatus Inquiries
185*4882a593Smuzhiyun================
186*4882a593Smuzhiyun
187*4882a593SmuzhiyunThe current state of ikbd modes and parameters may be found by sending status
188*4882a593Smuzhiyuninquiry commands that correspond to the ikbd set commands.
189*4882a593Smuzhiyun
190*4882a593SmuzhiyunPower-Up Mode
191*4882a593Smuzhiyun=============
192*4882a593Smuzhiyun
193*4882a593SmuzhiyunThe keyboard controller will perform a simple self-test on power-up to detect
194*4882a593Smuzhiyunmajor controller faults (ROM checksum and RAM test) and such things as stuck
195*4882a593Smuzhiyunkeys. Any keys down at power-up are presumed to be stuck, and their BREAK
196*4882a593Smuzhiyun(sic) code is returned (which without the preceding MAKE code is a flag for a
197*4882a593Smuzhiyunkeyboard error). If the controller self-test completes without error, the code
198*4882a593Smuzhiyun0xF0 is returned. (This code will be used to indicate the version/release of
199*4882a593Smuzhiyunthe ikbd controller. The first release of the ikbd is version 0xF0, should
200*4882a593Smuzhiyunthere be a second release it will be 0xF1, and so on.)
201*4882a593SmuzhiyunThe ikbd defaults to a mouse position reporting with threshold of 1 unit in
202*4882a593Smuzhiyuneither axis and the Y=0 origin at the top of the screen, and joystick event
203*4882a593Smuzhiyunreporting mode for joystick 1, with both buttons being logically assigned to
204*4882a593Smuzhiyunthe mouse. After any joystick command, the ikbd assumes that joysticks are
205*4882a593Smuzhiyunconnected to both Joystick0 and Joystick1. Any mouse command (except MOUSE
206*4882a593SmuzhiyunDISABLE) then causes port 0 to again be scanned as if it were a mouse, and
207*4882a593Smuzhiyunboth buttons are logically connected to it. If a mouse disable command is
208*4882a593Smuzhiyunreceived while port 0 is presumed to be a mouse, the button is logically
209*4882a593Smuzhiyunassigned to Joystick1 (until the mouse is reenabled by another mouse command).
210*4882a593Smuzhiyun
211*4882a593Smuzhiyunikbd Command Set
212*4882a593Smuzhiyun================
213*4882a593Smuzhiyun
214*4882a593SmuzhiyunThis section contains a list of commands that can be sent to the ikbd. Command
215*4882a593Smuzhiyuncodes (such as 0x00) which are not specified should perform no operation
216*4882a593Smuzhiyun(NOPs).
217*4882a593Smuzhiyun
218*4882a593SmuzhiyunRESET
219*4882a593Smuzhiyun-----
220*4882a593Smuzhiyun
221*4882a593Smuzhiyun::
222*4882a593Smuzhiyun
223*4882a593Smuzhiyun    0x80
224*4882a593Smuzhiyun    0x01
225*4882a593Smuzhiyun
226*4882a593SmuzhiyunN.B. The RESET command is the only two byte command understood by the ikbd.
227*4882a593SmuzhiyunAny byte following an 0x80 command byte other than 0x01 is ignored (and causes
228*4882a593Smuzhiyunthe 0x80 to be ignored).
229*4882a593SmuzhiyunA reset may also be caused by sending a break lasting at least 200mS to the
230*4882a593Smuzhiyunikbd.
231*4882a593SmuzhiyunExecuting the RESET command returns the keyboard to its default (power-up)
232*4882a593Smuzhiyunmode and parameter settings. It does not affect the time-of-day clock.
233*4882a593SmuzhiyunThe RESET command or function causes the ikbd to perform a simple self-test.
234*4882a593SmuzhiyunIf the test is successful, the ikbd will send the code of 0xF0 within 300mS
235*4882a593Smuzhiyunof receipt of the RESET command (or the end of the break, or power-up). The
236*4882a593Smuzhiyunikbd will then scan the key matrix for any stuck (closed) keys. Any keys found
237*4882a593Smuzhiyunclosed will cause the break scan code to be generated (the break code arriving
238*4882a593Smuzhiyunwithout being preceded by the make code is a flag for a key matrix error).
239*4882a593Smuzhiyun
240*4882a593SmuzhiyunSET MOUSE BUTTON ACTION
241*4882a593Smuzhiyun-----------------------
242*4882a593Smuzhiyun
243*4882a593Smuzhiyun::
244*4882a593Smuzhiyun
245*4882a593Smuzhiyun    0x07
246*4882a593Smuzhiyun    %00000mss           ; mouse button action
247*4882a593Smuzhiyun                        ;       (m is presumed = 1 when in MOUSE KEYCODE mode)
248*4882a593Smuzhiyun                        ; mss=0xy, mouse button press or release causes mouse
249*4882a593Smuzhiyun                        ;  position report
250*4882a593Smuzhiyun                        ;  where y=1, mouse key press causes absolute report
251*4882a593Smuzhiyun                        ;  and x=1, mouse key release causes absolute report
252*4882a593Smuzhiyun                        ; mss=100, mouse buttons act like keys
253*4882a593Smuzhiyun
254*4882a593SmuzhiyunThis command sets how the ikbd should treat the buttons on the mouse. The
255*4882a593Smuzhiyundefault mouse button action mode is %00000000, the buttons are treated as part
256*4882a593Smuzhiyunof the mouse logically.
257*4882a593SmuzhiyunWhen buttons act like keys, LEFT=0x74 & RIGHT=0x75.
258*4882a593Smuzhiyun
259*4882a593SmuzhiyunSET RELATIVE MOUSE POSITION REPORTING
260*4882a593Smuzhiyun-------------------------------------
261*4882a593Smuzhiyun
262*4882a593Smuzhiyun::
263*4882a593Smuzhiyun
264*4882a593Smuzhiyun    0x08
265*4882a593Smuzhiyun
266*4882a593SmuzhiyunSet relative mouse position reporting. (DEFAULT) Mouse position packets are
267*4882a593Smuzhiyungenerated asynchronously by the ikbd whenever motion exceeds the setable
268*4882a593Smuzhiyunthreshold in either axis (see SET MOUSE THRESHOLD). Depending upon the mouse
269*4882a593Smuzhiyunkey mode, mouse position reports may also be generated when either mouse
270*4882a593Smuzhiyunbutton is pressed or released. Otherwise the mouse buttons behave as if they
271*4882a593Smuzhiyunwere keyboard keys.
272*4882a593Smuzhiyun
273*4882a593SmuzhiyunSET ABSOLUTE MOUSE POSITIONING
274*4882a593Smuzhiyun------------------------------
275*4882a593Smuzhiyun
276*4882a593Smuzhiyun::
277*4882a593Smuzhiyun
278*4882a593Smuzhiyun    0x09
279*4882a593Smuzhiyun    XMSB                ; X maximum (in scaled mouse clicks)
280*4882a593Smuzhiyun    XLSB
281*4882a593Smuzhiyun    YMSB                ; Y maximum (in scaled mouse clicks)
282*4882a593Smuzhiyun    YLSB
283*4882a593Smuzhiyun
284*4882a593SmuzhiyunSet absolute mouse position maintenance. Resets the ikbd maintained X and Y
285*4882a593Smuzhiyuncoordinates.
286*4882a593SmuzhiyunIn this mode, the value of the internally maintained coordinates does NOT wrap
287*4882a593Smuzhiyunbetween 0 and large positive numbers. Excess motion below 0 is ignored. The
288*4882a593Smuzhiyuncommand sets the maximum positive value that can be attained in the scaled
289*4882a593Smuzhiyuncoordinate system. Motion beyond that value is also ignored.
290*4882a593Smuzhiyun
291*4882a593SmuzhiyunSET MOUSE KEYCODE MOSE
292*4882a593Smuzhiyun----------------------
293*4882a593Smuzhiyun
294*4882a593Smuzhiyun::
295*4882a593Smuzhiyun
296*4882a593Smuzhiyun    0x0A
297*4882a593Smuzhiyun    deltax              ; distance in X clicks to return (LEFT) or (RIGHT)
298*4882a593Smuzhiyun    deltay              ; distance in Y clicks to return (UP) or (DOWN)
299*4882a593Smuzhiyun
300*4882a593SmuzhiyunSet mouse monitoring routines to return cursor motion keycodes instead of
301*4882a593Smuzhiyuneither RELATIVE or ABSOLUTE motion records. The ikbd returns the appropriate
302*4882a593Smuzhiyuncursor keycode after mouse travel exceeding the user specified deltas in
303*4882a593Smuzhiyuneither axis. When the keyboard is in key scan code mode, mouse motion will
304*4882a593Smuzhiyuncause the make code immediately followed by the break code. Note that this
305*4882a593Smuzhiyuncommand is not affected by the mouse motion origin.
306*4882a593Smuzhiyun
307*4882a593SmuzhiyunSET MOUSE THRESHOLD
308*4882a593Smuzhiyun-------------------
309*4882a593Smuzhiyun
310*4882a593Smuzhiyun::
311*4882a593Smuzhiyun
312*4882a593Smuzhiyun    0x0B
313*4882a593Smuzhiyun    X                   ; x threshold in mouse ticks (positive integers)
314*4882a593Smuzhiyun    Y                   ; y threshold in mouse ticks (positive integers)
315*4882a593Smuzhiyun
316*4882a593SmuzhiyunThis command sets the threshold before a mouse event is generated. Note that
317*4882a593Smuzhiyunit does NOT affect the resolution of the data returned to the host. This
318*4882a593Smuzhiyuncommand is valid only in RELATIVE MOUSE POSITIONING mode. The thresholds
319*4882a593Smuzhiyundefault to 1 at RESET (or power-up).
320*4882a593Smuzhiyun
321*4882a593SmuzhiyunSET MOUSE SCALE
322*4882a593Smuzhiyun---------------
323*4882a593Smuzhiyun
324*4882a593Smuzhiyun::
325*4882a593Smuzhiyun
326*4882a593Smuzhiyun    0x0C
327*4882a593Smuzhiyun    X                   ; horizontal mouse ticks per internal X
328*4882a593Smuzhiyun    Y                   ; vertical mouse ticks per internal Y
329*4882a593Smuzhiyun
330*4882a593SmuzhiyunThis command sets the scale factor for the ABSOLUTE MOUSE POSITIONING mode.
331*4882a593SmuzhiyunIn this mode, the specified number of mouse phase changes ('clicks') must
332*4882a593Smuzhiyunoccur before the internally maintained coordinate is changed by one
333*4882a593Smuzhiyun(independently scaled for each axis). Remember that the mouse position
334*4882a593Smuzhiyuninformation is available only by interrogating the ikbd in the ABSOLUTE MOUSE
335*4882a593SmuzhiyunPOSITIONING mode unless the ikbd has been commanded to report on button press
336*4882a593Smuzhiyunor release (see SET MOSE BUTTON ACTION).
337*4882a593Smuzhiyun
338*4882a593SmuzhiyunINTERROGATE MOUSE POSITION
339*4882a593Smuzhiyun--------------------------
340*4882a593Smuzhiyun
341*4882a593Smuzhiyun::
342*4882a593Smuzhiyun
343*4882a593Smuzhiyun    0x0D
344*4882a593Smuzhiyun    Returns:
345*4882a593Smuzhiyun            0xF7       ; absolute mouse position header
346*4882a593Smuzhiyun    BUTTONS
347*4882a593Smuzhiyun            0000dcba   ; where a is right button down since last interrogation
348*4882a593Smuzhiyun                       ; b is right button up since last
349*4882a593Smuzhiyun                       ; c is left button down since last
350*4882a593Smuzhiyun                       ; d is left button up since last
351*4882a593Smuzhiyun            XMSB       ; X coordinate
352*4882a593Smuzhiyun            XLSB
353*4882a593Smuzhiyun            YMSB       ; Y coordinate
354*4882a593Smuzhiyun            YLSB
355*4882a593Smuzhiyun
356*4882a593SmuzhiyunThe INTERROGATE MOUSE POSITION command is valid when in the ABSOLUTE MOUSE
357*4882a593SmuzhiyunPOSITIONING mode, regardless of the setting of the MOUSE BUTTON ACTION.
358*4882a593Smuzhiyun
359*4882a593SmuzhiyunLOAD MOUSE POSITION
360*4882a593Smuzhiyun-------------------
361*4882a593Smuzhiyun
362*4882a593Smuzhiyun::
363*4882a593Smuzhiyun
364*4882a593Smuzhiyun    0x0E
365*4882a593Smuzhiyun    0x00                ; filler
366*4882a593Smuzhiyun    XMSB                ; X coordinate
367*4882a593Smuzhiyun    XLSB                ; (in scaled coordinate system)
368*4882a593Smuzhiyun    YMSB                ; Y coordinate
369*4882a593Smuzhiyun    YLSB
370*4882a593Smuzhiyun
371*4882a593SmuzhiyunThis command allows the user to preset the internally maintained absolute
372*4882a593Smuzhiyunmouse position.
373*4882a593Smuzhiyun
374*4882a593SmuzhiyunSET Y=0 AT BOTTOM
375*4882a593Smuzhiyun-----------------
376*4882a593Smuzhiyun
377*4882a593Smuzhiyun::
378*4882a593Smuzhiyun
379*4882a593Smuzhiyun    0x0F
380*4882a593Smuzhiyun
381*4882a593SmuzhiyunThis command makes the origin of the Y axis to be at the bottom of the
382*4882a593Smuzhiyunlogical coordinate system internal to the ikbd for all relative or absolute
383*4882a593Smuzhiyunmouse motion. This causes mouse motion toward the user to be negative in sign
384*4882a593Smuzhiyunand away from the user to be positive.
385*4882a593Smuzhiyun
386*4882a593SmuzhiyunSET Y=0 AT TOP
387*4882a593Smuzhiyun--------------
388*4882a593Smuzhiyun
389*4882a593Smuzhiyun::
390*4882a593Smuzhiyun
391*4882a593Smuzhiyun    0x10
392*4882a593Smuzhiyun
393*4882a593SmuzhiyunMakes the origin of the Y axis to be at the top of the logical coordinate
394*4882a593Smuzhiyunsystem within the ikbd for all relative or absolute mouse motion. (DEFAULT)
395*4882a593SmuzhiyunThis causes mouse motion toward the user to be positive in sign and away from
396*4882a593Smuzhiyunthe user to be negative.
397*4882a593Smuzhiyun
398*4882a593SmuzhiyunRESUME
399*4882a593Smuzhiyun------
400*4882a593Smuzhiyun
401*4882a593Smuzhiyun::
402*4882a593Smuzhiyun
403*4882a593Smuzhiyun    0x11
404*4882a593Smuzhiyun
405*4882a593SmuzhiyunResume sending data to the host. Since any command received by the ikbd after
406*4882a593Smuzhiyunits output has been paused also causes an implicit RESUME this command can be
407*4882a593Smuzhiyunthought of as a NO OPERATION command. If this command is received by the ikbd
408*4882a593Smuzhiyunand it is not PAUSED, it is simply ignored.
409*4882a593Smuzhiyun
410*4882a593SmuzhiyunDISABLE MOUSE
411*4882a593Smuzhiyun-------------
412*4882a593Smuzhiyun
413*4882a593Smuzhiyun::
414*4882a593Smuzhiyun
415*4882a593Smuzhiyun    0x12
416*4882a593Smuzhiyun
417*4882a593SmuzhiyunAll mouse event reporting is disabled (and scanning may be internally
418*4882a593Smuzhiyundisabled). Any valid mouse mode command resumes mouse motion monitoring. (The
419*4882a593Smuzhiyunvalid mouse mode commands are SET RELATIVE MOUSE POSITION REPORTING, SET
420*4882a593SmuzhiyunABSOLUTE MOUSE POSITIONING, and SET MOUSE KEYCODE MODE. )
421*4882a593SmuzhiyunN.B. If the mouse buttons have been commanded to act like keyboard keys, this
422*4882a593Smuzhiyuncommand DOES affect their actions.
423*4882a593Smuzhiyun
424*4882a593SmuzhiyunPAUSE OUTPUT
425*4882a593Smuzhiyun------------
426*4882a593Smuzhiyun
427*4882a593Smuzhiyun::
428*4882a593Smuzhiyun
429*4882a593Smuzhiyun    0x13
430*4882a593Smuzhiyun
431*4882a593SmuzhiyunStop sending data to the host until another valid command is received. Key
432*4882a593Smuzhiyunmatrix activity is still monitored and scan codes or ASCII characters enqueued
433*4882a593Smuzhiyun(up to the maximum supported by the microcontroller) to be sent when the host
434*4882a593Smuzhiyunallows the output to be resumed. If in the JOYSTICK EVENT REPORTING mode,
435*4882a593Smuzhiyunjoystick events are also queued.
436*4882a593SmuzhiyunMouse motion should be accumulated while the output is paused. If the ikbd is
437*4882a593Smuzhiyunin RELATIVE MOUSE POSITIONING REPORTING mode, motion is accumulated beyond the
438*4882a593Smuzhiyunnormal threshold limits to produce the minimum number of packets necessary for
439*4882a593Smuzhiyuntransmission when output is resumed. Pressing or releasing either mouse button
440*4882a593Smuzhiyuncauses any accumulated motion to be immediately queued as packets, if the
441*4882a593Smuzhiyunmouse is in RELATIVE MOUSE POSITION REPORTING mode.
442*4882a593SmuzhiyunBecause of the limitations of the microcontroller memory this command should
443*4882a593Smuzhiyunbe used sparingly, and the output should not be shut of for more than <tbd>
444*4882a593Smuzhiyunmilliseconds at a time.
445*4882a593SmuzhiyunThe output is stopped only at the end of the current 'even'. If the PAUSE
446*4882a593SmuzhiyunOUTPUT command is received in the middle of a multiple byte report, the packet
447*4882a593Smuzhiyunwill still be transmitted to conclusion and then the PAUSE will take effect.
448*4882a593SmuzhiyunWhen the ikbd is in either the JOYSTICK MONITORING mode or the FIRE BUTTON
449*4882a593SmuzhiyunMONITORING mode, the PAUSE OUTPUT command also temporarily stops the
450*4882a593Smuzhiyunmonitoring process (i.e. the samples are not enqueued for transmission).
451*4882a593Smuzhiyun
452*4882a593SmuzhiyunSET JOYSTICK EVENT REPORTING
453*4882a593Smuzhiyun----------------------------
454*4882a593Smuzhiyun
455*4882a593Smuzhiyun::
456*4882a593Smuzhiyun
457*4882a593Smuzhiyun    0x14
458*4882a593Smuzhiyun
459*4882a593SmuzhiyunEnter JOYSTICK EVENT REPORTING mode (DEFAULT). Each opening or closure of a
460*4882a593Smuzhiyunjoystick switch or trigger causes a joystick event record to be generated.
461*4882a593Smuzhiyun
462*4882a593SmuzhiyunSET JOYSTICK INTERROGATION MODE
463*4882a593Smuzhiyun-------------------------------
464*4882a593Smuzhiyun
465*4882a593Smuzhiyun::
466*4882a593Smuzhiyun
467*4882a593Smuzhiyun    0x15
468*4882a593Smuzhiyun
469*4882a593SmuzhiyunDisables JOYSTICK EVENT REPORTING. Host must send individual JOYSTICK
470*4882a593SmuzhiyunINTERROGATE commands to sense joystick state.
471*4882a593Smuzhiyun
472*4882a593SmuzhiyunJOYSTICK INTERROGATE
473*4882a593Smuzhiyun--------------------
474*4882a593Smuzhiyun
475*4882a593Smuzhiyun::
476*4882a593Smuzhiyun
477*4882a593Smuzhiyun    0x16
478*4882a593Smuzhiyun
479*4882a593SmuzhiyunReturn a record indicating the current state of the joysticks. This command
480*4882a593Smuzhiyunis valid in either the JOYSTICK EVENT REPORTING mode or the JOYSTICK
481*4882a593SmuzhiyunINTERROGATION MODE.
482*4882a593Smuzhiyun
483*4882a593SmuzhiyunSET JOYSTICK MONITORING
484*4882a593Smuzhiyun-----------------------
485*4882a593Smuzhiyun
486*4882a593Smuzhiyun::
487*4882a593Smuzhiyun
488*4882a593Smuzhiyun    0x17
489*4882a593Smuzhiyun    rate                ; time between samples in hundredths of a second
490*4882a593Smuzhiyun    Returns: (in packets of two as long as in mode)
491*4882a593Smuzhiyun            %000000xy   ; where y is JOYSTICK1 Fire button
492*4882a593Smuzhiyun                        ; and x is JOYSTICK0 Fire button
493*4882a593Smuzhiyun            %nnnnmmmm   ; where m is JOYSTICK1 state
494*4882a593Smuzhiyun                        ; and n is JOYSTICK0 state
495*4882a593Smuzhiyun
496*4882a593SmuzhiyunSets the ikbd to do nothing but monitor the serial command line, maintain the
497*4882a593Smuzhiyuntime-of-day clock, and monitor the joystick. The rate sets the interval
498*4882a593Smuzhiyunbetween joystick samples.
499*4882a593SmuzhiyunN.B. The user should not set the rate higher than the serial communications
500*4882a593Smuzhiyunchannel will allow the 2 bytes packets to be transmitted.
501*4882a593Smuzhiyun
502*4882a593SmuzhiyunSET FIRE BUTTON MONITORING
503*4882a593Smuzhiyun--------------------------
504*4882a593Smuzhiyun
505*4882a593Smuzhiyun::
506*4882a593Smuzhiyun
507*4882a593Smuzhiyun    0x18
508*4882a593Smuzhiyun    Returns: (as long as in mode)
509*4882a593Smuzhiyun            %bbbbbbbb   ; state of the JOYSTICK1 fire button packed
510*4882a593Smuzhiyun                        ; 8 bits per byte, the first sample if the MSB
511*4882a593Smuzhiyun
512*4882a593SmuzhiyunSet the ikbd to do nothing but monitor the serial command line, maintain the
513*4882a593Smuzhiyuntime-of-day clock, and monitor the fire button on Joystick 1. The fire button
514*4882a593Smuzhiyunis scanned at a rate that causes 8 samples to be made in the time it takes for
515*4882a593Smuzhiyunthe previous byte to be sent to the host (i.e. scan rate = 8/10 * baud rate).
516*4882a593SmuzhiyunThe sample interval should be as constant as possible.
517*4882a593Smuzhiyun
518*4882a593SmuzhiyunSET JOYSTICK KEYCODE MODE
519*4882a593Smuzhiyun-------------------------
520*4882a593Smuzhiyun
521*4882a593Smuzhiyun::
522*4882a593Smuzhiyun
523*4882a593Smuzhiyun    0x19
524*4882a593Smuzhiyun    RX                  ; length of time (in tenths of seconds) until
525*4882a593Smuzhiyun                        ; horizontal velocity breakpoint is reached
526*4882a593Smuzhiyun    RY                  ; length of time (in tenths of seconds) until
527*4882a593Smuzhiyun                        ; vertical velocity breakpoint is reached
528*4882a593Smuzhiyun    TX                  ; length (in tenths of seconds) of joystick closure
529*4882a593Smuzhiyun                        ; until horizontal cursor key is generated before RX
530*4882a593Smuzhiyun                        ; has elapsed
531*4882a593Smuzhiyun    TY                  ; length (in tenths of seconds) of joystick closure
532*4882a593Smuzhiyun                        ; until vertical cursor key is generated before RY
533*4882a593Smuzhiyun                        ; has elapsed
534*4882a593Smuzhiyun    VX                  ; length (in tenths of seconds) of joystick closure
535*4882a593Smuzhiyun                        ; until horizontal cursor keystrokes are generated
536*4882a593Smuzhiyun                        ; after RX has elapsed
537*4882a593Smuzhiyun    VY                  ; length (in tenths of seconds) of joystick closure
538*4882a593Smuzhiyun                        ; until vertical cursor keystrokes are generated
539*4882a593Smuzhiyun                        ; after RY has elapsed
540*4882a593Smuzhiyun
541*4882a593SmuzhiyunIn this mode, joystick 0 is scanned in a way that simulates cursor keystrokes.
542*4882a593SmuzhiyunOn initial closure, a keystroke pair (make/break) is generated. Then up to Rn
543*4882a593Smuzhiyuntenths of seconds later, keystroke pairs are generated every Tn tenths of
544*4882a593Smuzhiyunseconds. After the Rn breakpoint is reached, keystroke pairs are generated
545*4882a593Smuzhiyunevery Vn tenths of seconds. This provides a velocity (auto-repeat) breakpoint
546*4882a593Smuzhiyunfeature.
547*4882a593SmuzhiyunNote that by setting RX and/or Ry to zero, the velocity feature can be
548*4882a593Smuzhiyundisabled. The values of TX and TY then become meaningless, and the generation
549*4882a593Smuzhiyunof cursor 'keystrokes' is set by VX and VY.
550*4882a593Smuzhiyun
551*4882a593SmuzhiyunDISABLE JOYSTICKS
552*4882a593Smuzhiyun-----------------
553*4882a593Smuzhiyun
554*4882a593Smuzhiyun::
555*4882a593Smuzhiyun
556*4882a593Smuzhiyun    0x1A
557*4882a593Smuzhiyun
558*4882a593SmuzhiyunDisable the generation of any joystick events (and scanning may be internally
559*4882a593Smuzhiyundisabled). Any valid joystick mode command resumes joystick monitoring. (The
560*4882a593Smuzhiyunjoystick mode commands are SET JOYSTICK EVENT REPORTING, SET JOYSTICK
561*4882a593SmuzhiyunINTERROGATION MODE, SET JOYSTICK MONITORING, SET FIRE BUTTON MONITORING, and
562*4882a593SmuzhiyunSET JOYSTICK KEYCODE MODE.)
563*4882a593Smuzhiyun
564*4882a593SmuzhiyunTIME-OF-DAY CLOCK SET
565*4882a593Smuzhiyun---------------------
566*4882a593Smuzhiyun
567*4882a593Smuzhiyun::
568*4882a593Smuzhiyun
569*4882a593Smuzhiyun    0x1B
570*4882a593Smuzhiyun    YY                  ; year (2 least significant digits)
571*4882a593Smuzhiyun    MM                  ; month
572*4882a593Smuzhiyun    DD                  ; day
573*4882a593Smuzhiyun    hh                  ; hour
574*4882a593Smuzhiyun    mm                  ; minute
575*4882a593Smuzhiyun    ss                  ; second
576*4882a593Smuzhiyun
577*4882a593SmuzhiyunAll time-of-day data should be sent to the ikbd in packed BCD format.
578*4882a593SmuzhiyunAny digit that is not a valid BCD digit should be treated as a 'don't care'
579*4882a593Smuzhiyunand not alter that particular field of the date or time. This permits setting
580*4882a593Smuzhiyunonly some subfields of the time-of-day clock.
581*4882a593Smuzhiyun
582*4882a593SmuzhiyunINTERROGATE TIME-OF-DAT CLOCK
583*4882a593Smuzhiyun-----------------------------
584*4882a593Smuzhiyun
585*4882a593Smuzhiyun::
586*4882a593Smuzhiyun
587*4882a593Smuzhiyun    0x1C
588*4882a593Smuzhiyun    Returns:
589*4882a593Smuzhiyun            0xFC        ; time-of-day event header
590*4882a593Smuzhiyun            YY          ; year (2 least significant digits)
591*4882a593Smuzhiyun            MM          ; month
592*4882a593Smuzhiyun            DD          ; day
593*4882a593Smuzhiyun            hh          ; hour
594*4882a593Smuzhiyun            mm          ; minute
595*4882a593Smuzhiyun            ss          ; second
596*4882a593Smuzhiyun
597*4882a593Smuzhiyun    All time-of-day is sent in packed BCD format.
598*4882a593Smuzhiyun
599*4882a593SmuzhiyunMEMORY LOAD
600*4882a593Smuzhiyun-----------
601*4882a593Smuzhiyun
602*4882a593Smuzhiyun::
603*4882a593Smuzhiyun
604*4882a593Smuzhiyun    0x20
605*4882a593Smuzhiyun    ADRMSB              ; address in controller
606*4882a593Smuzhiyun    ADRLSB              ; memory to be loaded
607*4882a593Smuzhiyun    NUM                 ; number of bytes (0-128)
608*4882a593Smuzhiyun    { data }
609*4882a593Smuzhiyun
610*4882a593SmuzhiyunThis command permits the host to load arbitrary values into the ikbd
611*4882a593Smuzhiyuncontroller memory. The time between data bytes must be less than 20ms.
612*4882a593Smuzhiyun
613*4882a593SmuzhiyunMEMORY READ
614*4882a593Smuzhiyun-----------
615*4882a593Smuzhiyun
616*4882a593Smuzhiyun::
617*4882a593Smuzhiyun
618*4882a593Smuzhiyun    0x21
619*4882a593Smuzhiyun    ADRMSB              ; address in controller
620*4882a593Smuzhiyun    ADRLSB              ; memory to be read
621*4882a593Smuzhiyun    Returns:
622*4882a593Smuzhiyun            0xF6        ; status header
623*4882a593Smuzhiyun            0x20        ; memory access
624*4882a593Smuzhiyun            { data }    ; 6 data bytes starting at ADR
625*4882a593Smuzhiyun
626*4882a593SmuzhiyunThis command permits the host to read from the ikbd controller memory.
627*4882a593Smuzhiyun
628*4882a593SmuzhiyunCONTROLLER EXECUTE
629*4882a593Smuzhiyun------------------
630*4882a593Smuzhiyun
631*4882a593Smuzhiyun::
632*4882a593Smuzhiyun
633*4882a593Smuzhiyun    0x22
634*4882a593Smuzhiyun    ADRMSB              ; address of subroutine in
635*4882a593Smuzhiyun    ADRLSB              ; controller memory to be called
636*4882a593Smuzhiyun
637*4882a593SmuzhiyunThis command allows the host to command the execution of a subroutine in the
638*4882a593Smuzhiyunikbd controller memory.
639*4882a593Smuzhiyun
640*4882a593SmuzhiyunSTATUS INQUIRIES
641*4882a593Smuzhiyun----------------
642*4882a593Smuzhiyun
643*4882a593Smuzhiyun::
644*4882a593Smuzhiyun
645*4882a593Smuzhiyun    Status commands are formed by inclusively ORing 0x80 with the
646*4882a593Smuzhiyun    relevant SET command.
647*4882a593Smuzhiyun
648*4882a593Smuzhiyun    Example:
649*4882a593Smuzhiyun    0x88 (or 0x89 or 0x8A)  ; request mouse mode
650*4882a593Smuzhiyun    Returns:
651*4882a593Smuzhiyun            0xF6        ; status response header
652*4882a593Smuzhiyun            mode        ; 0x08 is RELATIVE
653*4882a593Smuzhiyun                        ; 0x09 is ABSOLUTE
654*4882a593Smuzhiyun                        ; 0x0A is KEYCODE
655*4882a593Smuzhiyun            param1      ; 0 is RELATIVE
656*4882a593Smuzhiyun                        ; XMSB maximum if ABSOLUTE
657*4882a593Smuzhiyun                        ; DELTA X is KEYCODE
658*4882a593Smuzhiyun            param2      ; 0 is RELATIVE
659*4882a593Smuzhiyun                        ; YMSB maximum if ABSOLUTE
660*4882a593Smuzhiyun                        ; DELTA Y is KEYCODE
661*4882a593Smuzhiyun            param3      ; 0 if RELATIVE
662*4882a593Smuzhiyun                        ; or KEYCODE
663*4882a593Smuzhiyun                        ; YMSB is ABSOLUTE
664*4882a593Smuzhiyun            param4      ; 0 if RELATIVE
665*4882a593Smuzhiyun                        ; or KEYCODE
666*4882a593Smuzhiyun                        ; YLSB is ABSOLUTE
667*4882a593Smuzhiyun            0           ; pad
668*4882a593Smuzhiyun            0
669*4882a593Smuzhiyun
670*4882a593SmuzhiyunThe STATUS INQUIRY commands request the ikbd to return either the current mode
671*4882a593Smuzhiyunor the parameters associated with a given command. All status reports are
672*4882a593Smuzhiyunpadded to form 8 byte long return packets. The responses to the status
673*4882a593Smuzhiyunrequests are designed so that the host may store them away (after stripping
674*4882a593Smuzhiyunoff the status report header byte) and later send them back as commands to
675*4882a593Smuzhiyunikbd to restore its state. The 0 pad bytes will be treated as NOPs by the
676*4882a593Smuzhiyunikbd.
677*4882a593Smuzhiyun
678*4882a593Smuzhiyun    Valid STATUS INQUIRY commands are::
679*4882a593Smuzhiyun
680*4882a593Smuzhiyun            0x87    mouse button action
681*4882a593Smuzhiyun            0x88    mouse mode
682*4882a593Smuzhiyun            0x89
683*4882a593Smuzhiyun            0x8A
684*4882a593Smuzhiyun            0x8B    mnouse threshold
685*4882a593Smuzhiyun            0x8C    mouse scale
686*4882a593Smuzhiyun            0x8F    mouse vertical coordinates
687*4882a593Smuzhiyun            0x90    ( returns       0x0F Y=0 at bottom
688*4882a593Smuzhiyun                            0x10 Y=0 at top )
689*4882a593Smuzhiyun            0x92    mouse enable/disable
690*4882a593Smuzhiyun                    ( returns       0x00 enabled)
691*4882a593Smuzhiyun                            0x12 disabled )
692*4882a593Smuzhiyun            0x94    joystick mode
693*4882a593Smuzhiyun            0x95
694*4882a593Smuzhiyun            0x96
695*4882a593Smuzhiyun            0x9A    joystick enable/disable
696*4882a593Smuzhiyun                    ( returns       0x00 enabled
697*4882a593Smuzhiyun                            0x1A disabled )
698*4882a593Smuzhiyun
699*4882a593SmuzhiyunIt is the (host) programmer's responsibility to have only one unanswered
700*4882a593Smuzhiyuninquiry in process at a time.
701*4882a593SmuzhiyunSTATUS INQUIRY commands are not valid if the ikbd is in JOYSTICK MONITORING
702*4882a593Smuzhiyunmode or FIRE BUTTON MONITORING mode.
703*4882a593Smuzhiyun
704*4882a593Smuzhiyun
705*4882a593SmuzhiyunSCAN CODES
706*4882a593Smuzhiyun==========
707*4882a593Smuzhiyun
708*4882a593SmuzhiyunThe key scan codes returned by the ikbd are chosen to simplify the
709*4882a593Smuzhiyunimplementation of GSX.
710*4882a593Smuzhiyun
711*4882a593SmuzhiyunGSX Standard Keyboard Mapping
712*4882a593Smuzhiyun
713*4882a593Smuzhiyun======= ============
714*4882a593SmuzhiyunHex	Keytop
715*4882a593Smuzhiyun======= ============
716*4882a593Smuzhiyun01	Esc
717*4882a593Smuzhiyun02	1
718*4882a593Smuzhiyun03	2
719*4882a593Smuzhiyun04	3
720*4882a593Smuzhiyun05	4
721*4882a593Smuzhiyun06	5
722*4882a593Smuzhiyun07	6
723*4882a593Smuzhiyun08	7
724*4882a593Smuzhiyun09	8
725*4882a593Smuzhiyun0A	9
726*4882a593Smuzhiyun0B	0
727*4882a593Smuzhiyun0C	\-
728*4882a593Smuzhiyun0D	\=
729*4882a593Smuzhiyun0E	BS
730*4882a593Smuzhiyun0F	TAB
731*4882a593Smuzhiyun10	Q
732*4882a593Smuzhiyun11	W
733*4882a593Smuzhiyun12	E
734*4882a593Smuzhiyun13	R
735*4882a593Smuzhiyun14	T
736*4882a593Smuzhiyun15	Y
737*4882a593Smuzhiyun16	U
738*4882a593Smuzhiyun17	I
739*4882a593Smuzhiyun18	O
740*4882a593Smuzhiyun19	P
741*4882a593Smuzhiyun1A	[
742*4882a593Smuzhiyun1B	]
743*4882a593Smuzhiyun1C	RET
744*4882a593Smuzhiyun1D	CTRL
745*4882a593Smuzhiyun1E	A
746*4882a593Smuzhiyun1F	S
747*4882a593Smuzhiyun20	D
748*4882a593Smuzhiyun21	F
749*4882a593Smuzhiyun22	G
750*4882a593Smuzhiyun23	H
751*4882a593Smuzhiyun24	J
752*4882a593Smuzhiyun25	K
753*4882a593Smuzhiyun26	L
754*4882a593Smuzhiyun27	;
755*4882a593Smuzhiyun28	'
756*4882a593Smuzhiyun29	\`
757*4882a593Smuzhiyun2A	(LEFT) SHIFT
758*4882a593Smuzhiyun2B	\\
759*4882a593Smuzhiyun2C	Z
760*4882a593Smuzhiyun2D	X
761*4882a593Smuzhiyun2E	C
762*4882a593Smuzhiyun2F	V
763*4882a593Smuzhiyun30	B
764*4882a593Smuzhiyun31	N
765*4882a593Smuzhiyun32	M
766*4882a593Smuzhiyun33	,
767*4882a593Smuzhiyun34	.
768*4882a593Smuzhiyun35	/
769*4882a593Smuzhiyun36	(RIGHT) SHIFT
770*4882a593Smuzhiyun37	{ NOT USED }
771*4882a593Smuzhiyun38	ALT
772*4882a593Smuzhiyun39	SPACE BAR
773*4882a593Smuzhiyun3A	CAPS LOCK
774*4882a593Smuzhiyun3B	F1
775*4882a593Smuzhiyun3C	F2
776*4882a593Smuzhiyun3D	F3
777*4882a593Smuzhiyun3E	F4
778*4882a593Smuzhiyun3F	F5
779*4882a593Smuzhiyun40	F6
780*4882a593Smuzhiyun41	F7
781*4882a593Smuzhiyun42	F8
782*4882a593Smuzhiyun43	F9
783*4882a593Smuzhiyun44	F10
784*4882a593Smuzhiyun45	{ NOT USED }
785*4882a593Smuzhiyun46	{ NOT USED }
786*4882a593Smuzhiyun47	HOME
787*4882a593Smuzhiyun48	UP ARROW
788*4882a593Smuzhiyun49	{ NOT USED }
789*4882a593Smuzhiyun4A	KEYPAD -
790*4882a593Smuzhiyun4B	LEFT ARROW
791*4882a593Smuzhiyun4C	{ NOT USED }
792*4882a593Smuzhiyun4D	RIGHT ARROW
793*4882a593Smuzhiyun4E	KEYPAD +
794*4882a593Smuzhiyun4F	{ NOT USED }
795*4882a593Smuzhiyun50	DOWN ARROW
796*4882a593Smuzhiyun51	{ NOT USED }
797*4882a593Smuzhiyun52	INSERT
798*4882a593Smuzhiyun53	DEL
799*4882a593Smuzhiyun54	{ NOT USED }
800*4882a593Smuzhiyun5F	{ NOT USED }
801*4882a593Smuzhiyun60	ISO KEY
802*4882a593Smuzhiyun61	UNDO
803*4882a593Smuzhiyun62	HELP
804*4882a593Smuzhiyun63	KEYPAD (
805*4882a593Smuzhiyun64	KEYPAD /
806*4882a593Smuzhiyun65	KEYPAD *
807*4882a593Smuzhiyun66	KEYPAD *
808*4882a593Smuzhiyun67	KEYPAD 7
809*4882a593Smuzhiyun68	KEYPAD 8
810*4882a593Smuzhiyun69	KEYPAD 9
811*4882a593Smuzhiyun6A	KEYPAD 4
812*4882a593Smuzhiyun6B	KEYPAD 5
813*4882a593Smuzhiyun6C	KEYPAD 6
814*4882a593Smuzhiyun6D	KEYPAD 1
815*4882a593Smuzhiyun6E	KEYPAD 2
816*4882a593Smuzhiyun6F	KEYPAD 3
817*4882a593Smuzhiyun70	KEYPAD 0
818*4882a593Smuzhiyun71	KEYPAD .
819*4882a593Smuzhiyun72	KEYPAD ENTER
820*4882a593Smuzhiyun======= ============
821