•  Back 
  •  XBIOS 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  %About 
  •  Show info about hypertext 
  •  View a new file 
Topic       : The ATARI Compendium
Author      : Scott Sanders / JAY Software
Version     : 1.25 (20/6/2003)
Subject     : Documentation
Nodes       : 1117
Index Size  : 32614
HCP-Version : 6
Compiled on : Atari
@charset    : UTF-8
@lang       : en
@default    : 
@help       : %About
@options    : +g -i -t4 +y +z
@width      : 100
View Ref-File
                         Keyboard and Mouse Control


The XBIOS has several functions that provide extended control over the
keyboard and mouse. These functions should be used with care, however, as
the keyboard and mouse are 'global' devices shared by other processes.

Initmous() is used to change the way the keyboard controller reports mouse
movements to the system. Changing this mode will cause the AES and VDI to be
unable to recognize mouse input.

Keytbl() allows you to read and manipulate the tables which translate
IKBD scan codes into ASCII codes. This is essential when you want your
application to run on Atari machines with foreign keyboards. Use Keytbl()
to return a pointer to the internal table structure and then convert
keycodes into ASCII by looking codes up in the appropriate table.

Loadable XBIOS Keyboard Tables

TOS versions 5.0 and greater support the loading of external keyboard
tables when the '_AKP' cookie is present. In this case, if a file called
'KEYTBL.TBL' is found in the '\MULTITOS' directory of the boot drive, it
will be loaded upon bootup to provide keyboard mapping changes. The format
of the file is as follows:


Magic Table Identifier Word

This should be a WORD value of 0x2771.


Unshifted Keyboard Table

This is a 128 byte table of ASCII codes that are generated when no
keyboard shift keys are being held down. There is one entry for each
possible scan code.


Shifted Keyboard Table

This is a 128 byte table of ASCII codes that are generated when the shift
key is being held down. There is one entry for each possible scan code.


CAPS-LOCK Keyboard Table

This is a 128 byte table of ASCII codes thatare generated when caps-lock
is engaged and no shift keys are being held. There is one entry for each
possible scan code.


Alternate-Unshifted Keyboard Table

This is a variable length table consisting of two-byte entries. Each entry
consists of a scan code and the ASCII code generated when that scan code
occurs while the alternate key (and no other) keyboard shift keys are
being held. The list is terminated by a single NULL byte.


Alternate-Shifted Keyboard Table

This is a variable length table consisting of two-byte entries. Each entry
consists of a scan code and the ASCII code generated when that scan code
occurs while the alternate key and the shift key is being held. The list
is terminated by a single NULL byte.


Alternate CAPS-LOCK Keyboard Table

This is a variable length table consisting of two-byte entries. Each entry
consists of a scan code and the ASCII code generated when that scan code
occurs while the alternate key is being held with the caps-lock mode in
effect. The list is terminated by a single NULL byte.



Bioskeys() returns any mapping changes made by Keytbl() to their original
state.

The configuration functions Cursconf() and Kbrate() set the cursor blink
rate and keyboard repeat rates respectively. These settings should only be
changed by a CPX or other configuration utility at the user's request as
they are global and affect all applications.

IKBD Intelligent Keyboard Controller

The IKBD Controller is an intelligent hardware device that handles
communications between the computer and the keyboard matrix. The XBIOS
function Ikbdws() can be used to transmit command strings to the IKBD
controller. For further information about the IKBD, consult
Chapter 5: Hardware.