home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fred Fish Collection 1.5
/
ffcollection-1-5-1992-11.iso
/
ff_disks
/
300-399
/
ff369.lzh
/
VaxTerm
/
src
/
keymaps.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-08-15
|
14KB
|
544 lines
#include <exec/types.h>
#include <devices/keymap.h>
#include <libraries/dos.h>
#include "keymap.h"
UBYTE replacements[] =
{ 0,1,2,3,4,5,6,7,8,9,10,11,12,16,17,21,26,27,32,41,42,43,49,55,56,57,58,QR };
UBYTE qual_repl[] = { 0,8,12,26,27,42,43 };
ULONG *fi_map[] = {
KEY('\xb0','`','~','`'),
KEY('!','1','!','1'),
KEY('@','2','"','2'),
KEY('#','3','£','3'),
KEY('\\','4','$','4'),
KEY('\x1e','\x1d','%','5'),
KEY('^','6','&','6'),
KEY('&','7','/','7'),
KEY('*','8','(','8'),
KEY('(','9',')','9'),
KEY(')','0','=','0'),
KEY('_','-','?','+'),
KEY('+','=','`','\x27'),
KEY('\xc5','\xe5','Q','q'),
KEY('\xb0','\xb0','W','w'),
KEY('\xa5','\xa4','Y','y'),
KEY('\xc5','\xe5','{','['),
KEY('^','\xa8','}',']'),
STR(&akey),
KEY(':','\x2c','\xd6','\xf6'),
KEY('"','\x27','\xC4','\xE4'),
KEY('\xdc','\xfc','*','\x27'),
KEY('\xac','\xb1','Z','z'),
KEY('\xbf','\xb8','M','m'),
KEY('<',',',';',','),
KEY('>','.',':','.'),
KEY('?','/','_','-'),
VAL(0) };
ULONG *ag_map[] = {
KEY('\xb0','~','^','~'),
KEY('!','1','!','1'),
KEY('"','2','"','2'),
KEY('\xa7','3','\xa7','3'),
KEY('$','4','$','4'),
KEY('\x1e','\x1d','%','5'),
KEY('{','6','&','6'),
KEY('}','7','/','7'),
KEY('(','8','(','8'),
KEY(')','9',')','9'),
KEY('=','0','=','0'),
KEY('?','\xdf','?','\xdf'),
STR(&rlacc),
KEY('\xc5','\xe5','Q','q'),
KEY('\xb0','\xb0','W','w'),
KEY('\xa5','\xa4','Z','z'),
KEY('\xdc','\xfc','\\','@'),
KEY('*','+','*','+'),
STR(&akey),
KEY('\xd5','\xf5','\xd5','\xf5'),
KEY('\xc4','\xe4','[',']'),
KEY('\x27','#','\x27','#'),
KEY('\xac','\xb1','Y','y'),
KEY('\xbf','\xb8','M','m'),
KEY(';',',',';',','),
KEY(':','.',':','.'),
KEY('_','-','_','-'),
VAL(PLEQ) };
ULONG *bf_map[] = {
STR(&laacc),
KEY('1','~','1','&'),
KEY('2','\xe9','2','\xe9'),
KEY('3','"','3','"'),
KEY('4','\x27','4','\x27'),
KEY('\x1e','\x1d','5','('),
KEY('{','[','6','\xa7'),
KEY('}',']','7','\xe8'),
KEY('8','^','8','!'),
KEY('9','\xe7','9','\xe7'),
KEY('0','\xc1','0','\xc1'),
KEY('\xb0',')','\xb0',')'),
KEY('_','-','_','-'),
STR(&akey),
KEY('\xb0','\xb0','Z','z'),
KEY('\xa5','\xa4','Y','y'),
STR(&hdacc),
KEY('*','£','*','$'),
KEY('\xc5','\xe5','Q','q'),
KEY('M','m','M','m'),
KEY('%','\\','%','\xdc'),
KEY('@','#','@','#'),
KEY('\xac','\xb1','W','w'),
KEY('\xbf','\xb8','?',','),
KEY('.',';','.',';'),
KEY('/',':','/',':'),
KEY('+','=','+','='),
VAL(CORN|UFCR|AQSW) };
ULONG *br_map[] = {
STR(&aoacc),
KEY('~','1','!','1'),
KEY('"','2','"','2'),
KEY('#','3','£','3'),
KEY('$','4','$','4'),
KEY('\x1e','\x1d','%','5'),
KEY('^','6','&','6'),
KEY('\x27','7','\x27','7'),
KEY('(','8','(','8'),
KEY(')','9',')','9'),
KEY('=','0','=','0'),
KEY('_','-','_','-'),
KEY('\xc5','\xc6','\xc5','\xc6'),
KEY('\xc5','\xe5','Q','q'),
KEY('\xb0','\xb0','W','w'),
KEY('\xa5','\xa4','Y','y'),
KEY('\\','|','\xa7','@'),
KEY('[',']','[',']'),
STR(&akey),
KEY('+',';','+',';'),
KEY('{','}','*',':'),
STR(&hlacc),
KEY('\xac','\xb1','Z','z'),
KEY('\xbf','\xb8','M','m'),
KEY(',',',',',',','),
KEY('.','.','.','.'),
KEY('?','/','?','/'),
VAL(CORN|LNCR) };
ULONG *cf_map[] = {
STR(&aoacc),
KEY('~','1','!','1'),
KEY('"','2','"','2'),
KEY('/','3','/','3'),
KEY('£','4','$','4'),
KEY('\x1e','\x1d','%','5'),
KEY('^','6','?','6'),
KEY('&','7','&','7'),
KEY('*','8','*','8'),
KEY('{','9','(','9'),
KEY('}','0',')','0'),
KEY('_','-','_','-'),
KEY('+','=','+','='),
STR(&akey),
KEY('\xb0','\xb0','W','w'),
KEY('\xa5','\xa4','Y','y'),
KEY('[',']','\xc7','\xe7'),
KEY('@','#','@','#'),
KEY('\xc5','\xe5','Q','q'),
KEY(':',';',':',';'),
STR(&hdacc),
KEY('|','\\','|','\\'),
KEY('\xac','\xb1','Z','z'),
KEY('\xbf','\xb8','M','m'),
KEY('\x27',',','\x27',','),
KEY('.','.','.','.'),
KEY('\xc8','\xe8','\xc8','\xe8'),
VAL(CORN|LFCR|AQSW) };
ULONG *dn_map[] = {
STR(&aoacc),
KEY('~','1','!','1'),
KEY('"','2','"','2'),
KEY('@','3','\xa7','3'),
KEY('£','4','$','4'),
KEY('\x1e','\x1d','%','5'),
KEY('^','6','&','6'),
KEY('/','7','/','7'),
KEY('{','8','(','8'),
KEY('}','9',')','9'),
KEY('=','0','=','0'),
KEY('{','}','?','+'),
STR(&rlacc),
KEY('\xc5','\xe5','Q','q'),
KEY('\xb0','\xb0','W','w'),
KEY('\xa5','\xa4','Y','y'),
KEY('[',']','\xc5','\xe5'),
STR(&dhacc),
STR(&akey),
KEY('\xc6','\xe6','\xc6','\xe6'),
KEY('\\','#','\xd8','\xf8'),
KEY('*','\x27','*','\x27'),
KEY('\xac','\xb1','Z','z'),
KEY('\xbf','\xb8','M','m'),
KEY(';',',',';',','),
KEY(':','.',':','.'),
KEY('_','-','_','-'),
VAL(CORN|PLEQ|UNCR) };
ULONG *du_map[] = {
STR(&aoacc),
KEY('1','\xbc','1','\xbc'),
KEY('[','2','\xbd','2'),
KEY(']','3','£','3'),
KEY('$','4','$','4'),
KEY('\x1e','\x1d','%','5'),
KEY('^','6','#','6'),
KEY('&','7','&','7'),
KEY('(','8','(','8'),
KEY(')','9',')','9'),
KEY('\\','0','\xa7','0'),
KEY('"','\x27','"','\x27'),
KEY(':','/',':','/'),
KEY('\xc5','\xe5','q','Q'),
KEY('\xb0','\xb0','w','W'),
KEY('\xa5','\xa4','y','Y'),
STR(&hlacc),
KEY('~','*','!','*'),
STR(&akey),
KEY('_','-','_','-'),
KEY('`','\x27','`','\x27'),
KEY('|','@','|','@'),
KEY('\xac','\xb1','z','Z'),
KEY('\xbf','\xb8','m','M'),
KEY('?',',','?',','),
KEY(';','.',';','.'),
KEY('+','=','+','='),
VAL(CORN|UFCR) };
ULONG *fl_map[] = {
STR(&laacc),
KEY('1','~','1','&'),
KEY('2','\xc8','2','\xc8'),
KEY('3','^','3','"'),
KEY('4','\x27','4','\x27'),
KEY('\x1e','\x1d','5','('),
KEY('6','[','6','\xa7'),
KEY('7',']','7','\xe8'),
KEY('8','!','8','!'),
KEY('{','\xe7','9','\xe7'),
KEY('}','\xc1','0','\xc1'),
KEY('\xb0',')','\xb0',')'),
KEY('_','-','_','-'),
STR(&akey),
KEY('\xb0','\xb0','Z','z'),
KEY('\xa5','\xa4','Y','y'),
STR(&hdacc),
KEY('*','£','*','$'),
KEY('\xc5','\xe5','Q','q'),
KEY('M','m','M','m'),
KEY('%','\\','%','\xfc'),
KEY('@','#','@','#'),
KEY('\xac','\xb1','W','w'),
KEY('\xbf','\xb8','?',','),
KEY('.',';','.',';'),
KEY('/',':','/',':'),
KEY('+','=','+','='),
VAL(CORN|UFCR|AQSW) };
ULONG *ic_map[] = {
STR(&lhacc),
KEY('~','1','!','1'),
KEY('"','2','"','2'),
KEY('#','3','#','3'),
KEY('£','4','$','4'),
KEY('\x1e','\x1d','%','5'),
KEY('^','6','&','6'),
KEY('/','7','/','7'),
KEY('(','8','(','8'),
KEY(')','9',')','9'),
KEY('=','0','=','0'),
KEY('\xd6','\xf6','\xd6','\xf6'),
KEY('_','-','_','-'),
KEY('\xc5','\xe5','Q','q'),
KEY('\xb0','\xb0','W','w'),
KEY('\xa5','\xa4','Y','y'),
KEY('@','\\','@','\\'),
KEY('?','\x27','?','\x27'),
STR(&akey),
KEY('{','}','[',']'),
KEY('`','\x27','`','\x27'),
KEY('*','+','*','+'),
KEY('\xac','\xb1','Z','z'),
KEY('\xbf','\xb8','M','m'),
KEY(';',',',';',','),
KEY(':','.',':','.'),
KEY('\xd8','\xf8','\xd8','\xf8'),
VAL(CORN) };
ULONG *it_map[] = {
STR(&laacc),
KEY('1','@','1','£'),
KEY('2','#','2','\xe9'),
KEY('3','~','3','"'),
KEY('4','\x27','4','\x27'),
KEY('\x1e','\x1d','5','('),
KEY('6','^','6','_'),
KEY('7','\xe8','7','\xe8'),
STR(&ital8),
KEY('9','[','9','\xe7'),
KEY('0',']','0','\xe0'),
KEY('\xb0',')','\xb0',')'),
KEY('+','-','+','-'),
KEY('\xc5','\xe5','Q','q'),
KEY('\xb0','\xb0','Z','z'),
KEY('\xa5','\xa4','Y','y'),
KEY('{','}','=','\xed'),
KEY('&','$','&','$'),
STR(&akey),
KEY('M','m','M','m'),
KEY('%','\xfa','%','\xfa'),
KEY('\\','*','\xa7','*'),
KEY('\xac','\xb1','W','w'),
KEY('\xbf','\xb8','?',','),
KEY('.',';','.',';'),
KEY('/',':','/',':'),
KEY('!','\xf3','!','\xf3'),
VAL(CORN|ITA8) };
ULONG *no_map[] = {
STR(&aoacc),
KEY('~','1','!','1'),
KEY('"','2','"','2'),
KEY('@','3','\xa7','3'),
KEY('£','4','$','4'),
KEY('\x1e','\x1d','%','5'),
KEY('^','6','&','6'),
KEY('/','7','/','7'),
KEY('{','8','(','8'),
KEY('}','9',')','9'),
KEY('=','0','=','0'),
KEY('{','}','?','+'),
STR(&rlacc),
KEY('\xc5','\xe5','Q','q'),
KEY('\xb0','\xb0','W','w'),
KEY('\xa5','\xa4','Y','y'),
KEY('[',']','\xc5','\xe5'),
STR(&dhacc),
STR(&akey),
KEY('\xd8','\xf8','\xd8','\xf8'),
KEY('\\','#','\xc6','\xe6'),
KEY('*','\x27','*','\x27'),
KEY('\xac','\xb1','Z','z'),
KEY('\xbf','\xb8','M','m'),
KEY(';',',',';',','),
KEY(':','.',':','.'),
KEY('_','-','_','-'),
VAL(CORN|PLEQ|UNCR) };
ULONG *po_map[] = {
KEY('\xb0','\\','|','\\'),
KEY('~','1','!','1'),
KEY('@','2','@','2'),
KEY('#','3','#','3'),
KEY('£','4','$','4'),
KEY('\x1e','\x1d','%','5'),
KEY('^','6','"','6'),
KEY('&','7','&','7'),
KEY('*','8','*','8'),
KEY('(','9','(','9'),
KEY(')','0',')','0'),
KEY('_','-','_','-'),
KEY('+','=','+','='),
KEY('\xc5','\xe5','Q','q'),
KEY('\xb0','\xb0','W','w'),
KEY('\xa5','\xa4','Y','y'),
STR(&rlacc),
KEY('}',']','}',']'),
STR(&akey),
KEY('\xc7','\xe7','\xc7','\xe7'),
STR(&ahacc),
KEY('{','[','{','['),
KEY('\xac','\xb1','Z','z'),
KEY('\xbf','\xb8','M','m'),
KEY(';',',',';',','),
KEY(':','.',':','.'),
KEY('?','/','?','/'),
VAL(UFCR|LFCR) };
ULONG *sp_map[] = {
KEY('\xa1','\xbf','\\','@'),
KEY('~','1','!','1'),
KEY('"','2','"','2'),
KEY('\xb0','3','#','3'),
KEY('£','4','$','4'),
KEY('\x1e','\x1d','%','5'),
KEY('^','6','&','6'),
KEY('/','7','/','7'),
KEY('{','8','(','8'),
KEY('}','9',')','9'),
KEY('=','0','=','0'),
KEY('?','\x27','?','\x27'),
KEY('[',']','\xb1','\xba'),
KEY('\xc5','\xe5','Q','q'),
KEY('\xb0','\xb0','W','w'),
KEY('\xa5','\xa4','Y','y'),
STR(&lhacc),
KEY('*','+','*','+'),
STR(&akey),
KEY('\xd1','\xf1','\xd1','\xf1'),
STR(&rdacc),
STR(&caacc),
KEY('\xac','\xb1','Z','z'),
KEY('\xbf','\xb8','M','m'),
KEY(';',',',';',','),
KEY(':','.',':','.'),
KEY('_','-','_','-'),
VAL(UFCR|LFCR|LNCR) };
ULONG *sw_map[] = {
STR(&aoacc),
KEY('~','1','!','1'),
KEY('"','2','"','2'),
KEY('@','3','\xa7','3'),
KEY('£','4','$','4'),
KEY('\x1e','\x1d','%','5'),
KEY('^','6','&','6'),
KEY('/','7','/','7'),
KEY('(','8','(','8'),
KEY(')','9',')','9'),
KEY('=','0','=','0'),
KEY('?','+','?','+'),
STR(&hlacc),
KEY('\xc5','\xe5','Q','q'),
KEY('\xb0','\xb0','W','w'),
KEY('\xa5','\xa4','Y','y'),
KEY('[',']','\xc5','\xe5'),
KEY('\\','#','\xdc','\xfc'),
STR(&akey),
KEY('{','}','\xd6','\xf6'),
KEY('£','|','\xc4','\xe4'),
KEY('*','\x27','*','\x27'),
KEY('\xac','\xb1','Z','z'),
KEY('\xbf','\xb8','M','m'),
KEY(';',',',';',','),
KEY(':','.',':','.'),
KEY('_','-','_','-'),
VAL(CORN|PLEQ) };
ULONG *sf_map[] = {
KEY('\xb0','!','\xb0','!'),
KEY('~','1','+','1'),
KEY('"','2','"','2'),
KEY('#','3','*','3'),
KEY('@','4','\xe7','4'),
KEY('\x1e','\x1d','%','5'),
KEY('^','6','&','6'),
KEY('/','7','/','7'),
KEY('{','8','(','8'),
KEY('}','9',')','9'),
KEY('=','0','=','0'),
KEY('{','}','?','\x27'),
STR(&hlacc),
KEY('\xc5','\xe5','Q','q'),
KEY('\xb0','\xb0','W','w'),
KEY('\xa5','\xa4','Z','z'),
KEY('\\','\xe9','\xfc','\xe9'),
STR(&daacc),
STR(&akey),
KEY('[','\xe8','\xf6','\xe8'),
KEY(']','\xe1','\xe4','\xe1'),
KEY('#','$','£','$'),
KEY('\xac','\xb1','Y','y'),
KEY('\xbf','\xb8','M','m'),
KEY(';',',',';',','),
KEY(':','.',':','.'),
KEY('_','-','_','-'),
VAL(PLEQ|UNCR) };
ULONG *sg_map[] = {
KEY('\xb0','!','\xb0','!'),
KEY('~','1','+','1'),
KEY('"','2','"','2'),
KEY('#','3','*','3'),
KEY('@','4','\xe7','4'),
KEY('\x1e','\x1d','%','5'),
KEY('^','6','&','6'),
KEY('/','7','/','7'),
KEY('{','8','(','8'),
KEY('}','9',')','9'),
KEY('=','0','=','0'),
KEY('{','}','?','\x27'),
STR(&hlacc),
KEY('\xc5','\xe5','Q','q'),
KEY('\xb0','\xb0','W','w'),
KEY('\xa5','\xa4','Z','z'),
KEY('\\','\xfc','\xe9','\xfc'),
STR(&daacc),
STR(&akey),
KEY('[','\xf6','\xe8','\xf6'),
KEY(']','\xe4','\xe1','\xe4'),
KEY('#','$','#','$'),
KEY('\xac','\xb1','Y','y'),
KEY('\xbf','\xb8','M','m'),
KEY(';',',',';',','),
KEY(':','.',':','.'),
KEY('_','-','_','-'),
VAL(PLEQ|UNCR) };
ULONG *us_map[] = {
KEY('~','`','~','`'),
KEY('!','1','!','1'),
KEY('\xb0','2','@','2'),
KEY('£','3','#','3'),
KEY('$','4','$','4'),
KEY('\x1e','\x1d','%','5'),
KEY('^','6','^','6'),
KEY('&','7','&','7'),
KEY('*','8','*','8'),
KEY('(','9','(','9'),
KEY(')','0',')','0'),
KEY('_','-','_','-'),
KEY('+','=','+','='),
KEY('\xc5','\xe5','Q','q'),
KEY('\xb0','\xb0','W','w'),
KEY('\xa5','\xa4','Y','y'),
KEY('{','[','{','['),
KEY('}',']','}',']'),
STR(&akey),
KEY(':',';',':',';'),
KEY('"','\x27','"','\x27'),
KEY('|','\\','|','\\'),
KEY('\xac','\xb1','Z','z'),
KEY('\xbf','\xb8','M','m'),
KEY(',',',',',',','),
KEY('.','.','.','.'),
KEY('?','/','?','/'),
VAL(0) };
replace(ULONG **key)
{
register ULONG val;
register USHORT cnt = 0;
while (replacements[cnt] != QR) {
lokeymap[replacements[cnt]] = *key++;
cnt++;
}
val = (ULONG)*key;
for (cnt = 0; cnt < REPC; cnt++) {
if (val & (1 << cnt)) lotypes[qual_repl[cnt]] = KCF_SHIFT|KCF_DEAD;
else lotypes[qual_repl[cnt]] = KCF_SHIFT|KCF_ALT;
}
if (val & AQSW) {
lotypes[16] = KCF_SHIFT|KCF_CONTROL|KCF_ALT|KCF_DEAD;
lotypes[32] = KCF_SHIFT|KCF_CONTROL|KCF_ALT;
}
else {
lotypes[16] = KCF_SHIFT|KCF_CONTROL|KCF_ALT;
lotypes[32] = KCF_SHIFT|KCF_CONTROL|KCF_ALT|KCF_DEAD;
}
return(0);
}