APPENDIX B
Common PEN*KEY 6000 Series Information
B-10 PEN*KEY
R
6200/6300 Hand-Held Computer Programmer’s Reference Guide
for (i = rlen; ––i; )
{
error = GetData();
if (TMO & error) return error;
*str++ = (UC) error;
}
return (0);
}
UI DefineMacro (UC keypos, UC len, UC far *definition)
{
UC I;
UC rcvstr;
UC cmdstr[15];
cmdstr[0] = KBD_MACRO | WRITE_DEVICE;
cmdstr[1] = keypos;
cmdstr[2] = len;
for (i = 3; i < 15; i++) cmdstr[i] = *def+;
return(MupCom(sizeof cmdstr, cmdstr, 0, &rcvstr));
}
UI DefineKey (UC keypos, UC keycode, UC type)
{
UC rcvstr;
UC cmdstr[4];
cmdstr[0] = KBD_DNLD | WRITE_DEVICE;
cmdstr[1] = keypos;
cmdstr[2] = keycode;
cmdstr[3] = type;
return(MupCom(sizeof cmdstr, cmdstr, 0, &rcvstr));
}
/* The f0 is here to mimic an AT-style up scan code. This could be removed*/
//UC F1[] = {0x3b,0xf0,0xbb,0,0,0,0,0,0,0,0,0};
//UC F2[] = {0x3c,0xf0,0xbc,0,0,0,0,0,0,0,0,0};
//UC F3[] = {0x3d,0xf0,0xbd,0,0,0,0,0,0,0,0,0};
//UC F4[] = {0x3e,0xf0,0xbe,0,0,0,0,0,0,0,0,0};
//UC F5[] = {0x3f,0xf0,0xbf,0,0,0,0,0,0,0,0,0};
//UC F6[] = {0x40,0xf0,0xc0,0,0,0,0,0,0,0,0,0};
//UC F7[] = {0x41,0xf0,0xc1,0,0,0,0,0,0,0,0,0};
//UC F8[] = {0x42,0xf0,0xc2,0,0,0,0,0,0,0,0,0};
//UC F9[] = {0x43,0xf0,0xc3,0,0,0,0,0,0,0,0,0};
//UC F10[] = {0x44,0xf0,0xc4,0,0,0,0,0,0,0,0,0};
//UC F11[] = {0x57,0xf0,0xd7,0,0,0,0,0,0,0,0,0};
//UC F12[] = {0x58,0xf0,0xd8,0,0,0,0,0,0,0,0,0};
/*key down, key up*/
UC PAGEUP[]= {0xe0,0x49,0xe0,0xa9,0,0,0,0,0,0,0,0};
UC PAGEDN[]= {0xe0,0x51,0xe0,0xa1,0,0,0,0,0,0,0,0};
/*shift-dn,tab-dn,shift-up,tab-up*/
UC BTAB[]= {0x2a,0x0f,0xaa,0x8f,0,0,0,0,0,0,0,0};
/*period-dn, period-up*/
UC PERIOD[]= {0x34,0xb4, 0, 0,0,0,0,0,0,0,0,0};
UC HOME[] = {0x1d,0xe0,0x47,0x9d,0xe0,0xc7,0,0,0,0,0,0};
/*cntl-dn, home-dn,cntl-up,home-up */
UC END[] = {0x1d,0xe0,0x4f,0x9d,0xe0,0xcf,0,0,0,0,0,0};
/*cntl-dn, end-dn,cntl-up,end-up */
UC SPACE[] = {0x39,0xb9, 0, 0,0,0,0,0,0,0,0,0};
//UC C[] = {0x2e,0xae, 0, 0,0,0,0,0,0,0,0,0}; /*C-dn, C-up*/
//UC E[] = {0x12,0x92, 0, 0,0,0,0,0,0,0,0,0}; /*E-dn, E-up*/
//UC M[] = {0x32,0xb2, 0, 0,0,0,0,0,0,0,0,0}; /*M-dn, M-up*/
void DownloadMacros()
{
UI I;
/********************************************************************
First number is the key #. Second number is the key sequence length. Last
parameter contains the AT-compatible make and break codes. This is an example
of mapping the gold+number keys as the function keys
B. Common PEN*KEY
6000 Series Info.