Atari ST series Technical Reference Manual page 52

Hide thumbs Also See for ST series:
Table of Contents

Advertisement

function with which you may alter the console keyboard ta­
bles is called Keytbl(), and takes the following format:
char unshift[128], shift[128], capslock[128];
long vectable;
vectable = KeytbHunshift, shift, capslock);
where unshift, shift, and capslock are pointers to your own
128-byte tables. A value of - 1 ($FFFFFFFF) in any of these
pointers will signal the function that you wish to leave that
table as it is. This function returns the pointer vectable, which
contains the address of a vector table. This vector table con­
tains pointers to each of the three keyboard tables. Its format
is
Byte
Number
0 -3
Address of the unshifted table
4 -7
Address of shifted table
8-11
Address of CapsLock table
The brief sample program XKEYTBL.C (Program 3-2),
written in C, shows how to use the shift table for CapsLock
as well. This causes the punctuation marks located on the
number keys on top of the keyboard to be printed when
CapsLock is set, but still allows you to print numbers with
the numeric keypad.
Program 3-2. XKEYTBL.C
/**********************************************/
/*
/*
XKEYTBL.C —
demonstrates use of the
/*
XBIOS routine to change the keyboard
/*
mapping tables, so that CapsLock
/*
keys have their Shifted value.
/ *
/**********************************************/
i f include <osbind.h>
main()
{
struct keytab
{
char *unshift;
char *shift?
char *capslock;
);
struct keytab * v t ;
vt = (struct keytab *)Keytbl(-lL,-lL,-lL);
Keytbl(-lL,-lL,vt->shift);
)
/******** end of XKEYTBL.C
44
CHAPTER 3
Contents
/* For XBIOS macro definitions */
/* Keytbl() returns a pointer
/* to this kind of structure
/* Pointer to the vector table returned */
/* put value of shift in CapsLock */
*****/
*/
*/
*/
*/
*/
V
*/
*/
get vector table */
/ *

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents