-/*\r
-=============================================================================\r
-\r
- LOCAL VARIABLES\r
-\r
-=============================================================================\r
-*/\r
-static byte far ASCIINames[] = // Unshifted ASCII for scan codes\r
- {\r
-// 0 1 2 3 4 5 6 7 8 9 A B C D E F\r
- 0 ,27 ,'1','2','3','4','5','6','7','8','9','0','-','=',8 ,9 , // 0\r
- 'q','w','e','r','t','y','u','i','o','p','[',']',13 ,0 ,'a','s', // 1\r
- 'd','f','g','h','j','k','l',';',39 ,'`',0 ,92 ,'z','x','c','v', // 2\r
- 'b','n','m',',','.','/',0 ,'*',0 ,' ',0 ,0 ,0 ,0 ,0 ,0 , // 3\r
- 0 ,0 ,0 ,0 ,0 ,0 ,0 ,'7','8','9','-','4','5','6','+','1', // 4\r
- '2','3','0',127,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 , // 5\r
- 0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 , // 6\r
- 0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 // 7\r
- },\r
- far ShiftNames[] = // Shifted ASCII for scan codes\r
- {\r
-// 0 1 2 3 4 5 6 7 8 9 A B C D E F\r
- 0 ,27 ,'!','@','#','$','%','^','&','*','(',')','_','+',8 ,9 , // 0\r
- 'Q','W','E','R','T','Y','U','I','O','P','{','}',13 ,0 ,'A','S', // 1\r
- 'D','F','G','H','J','K','L',':',34 ,'~',0 ,'|','Z','X','C','V', // 2\r
- 'B','N','M','<','>','?',0 ,'*',0 ,' ',0 ,0 ,0 ,0 ,0 ,0 , // 3\r
- 0 ,0 ,0 ,0 ,0 ,0 ,0 ,'7','8','9','-','4','5','6','+','1', // 4\r
- '2','3','0',127,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 , // 5\r
- 0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 , // 6\r
- 0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 // 7\r
- },\r
- far SpecialNames[] = // ASCII for 0xe0 prefixed codes\r
- {\r
-// 0 1 2 3 4 5 6 7 8 9 A B C D E F\r
- 0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 , // 0\r
- 0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,13 ,0 ,0 ,0 , // 1\r
- 0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 , // 2\r
- 0 ,0 ,0 ,0 ,0 ,'/',0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 , // 3\r
- 0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 , // 4\r
- 0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 , // 5\r
- 0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 , // 6\r
- 0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 // 7\r
- },\r
- *ScanNames[] = // Scan code names with single chars\r
- {\r
- "?","?","1","2","3","4","5","6","7","8","9","0","-","+","?","?",\r
- "Q","W","E","R","T","Y","U","I","O","P","[","]","|","?","A","S",\r
- "D","F","G","H","J","K","L",";","\"","?","?","?","Z","X","C","V",\r
- "B","N","M",",",".","/","?","?","?","?","?","?","?","?","?","?",\r
- "?","?","?","?","?","?","?","?","\xf","?","-","\x15","5","\x11","+","?",\r
- "\x13","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?",\r
- "?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?",\r
- "?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?"\r
- }, // DEBUG - consolidate these\r
- far ExtScanCodes[] = // Scan codes with >1 char names\r
- {\r
- 1,0xe,0xf,0x1d,0x2a,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,\r
- 0x3f,0x40,0x41,0x42,0x43,0x44,0x57,0x59,0x46,0x1c,0x36,\r
- 0x37,0x38,0x47,0x49,0x4f,0x51,0x52,0x53,0x45,0x48,\r
- 0x50,0x4b,0x4d,0x00\r
- },\r
- *ExtScanNames[] = // Names corresponding to ExtScanCodes\r
- {\r
- "Esc","BkSp","Tab","Ctrl","LShft","Space","CapsLk","F1","F2","F3","F4",\r
- "F5","F6","F7","F8","F9","F10","F11","F12","ScrlLk","Enter","RShft",\r
- "PrtSc","Alt","Home","PgUp","End","PgDn","Ins","Del","NumLk","Up",\r
- "Down","Left","Right",""\r
- };
-\r
-static Direction DirTable[] = // Quick lookup for total direction\r
- {\r
- //dir_Nortinest,\r
- dir_North,\r
- //dir_NorthEast,\r
- dir_West, dir_None, dir_East,\r
- //dir_Soutinest,\r
- dir_South//,dir_SouthEast\r
- };\r
-\r
-static void (*INL_KeyHook)(void);\r
-static void interrupt (*OldKeyVect)(void);\r
-\r
-static char *ParmStringsIN[] = {"nojoys","nomouse",nil};\r
-\r
-// Function prototypes\r
-#define IN_KeyDown(code) (Keyboard[(code)])\r
-#define IN_ClearKey(code) {Keyboard[code] = false; if (code == LastScan) LastScan = sc_None;}\r
-