home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / dev / m2 / CycloneModules.lha / modules / txt / KeyMapD.def < prev    next >
Text File  |  1995-05-26  |  2KB  |  69 lines

  1. (*$ Implementation- *)
  2. DEFINITION MODULE KeyMapD;
  3.  
  4. (* (C) Copyright 1994 Marcel Timmermans. All rights reserved. *)
  5.  
  6. FROM SYSTEM IMPORT LONGSET,ADDRESS;
  7. FROM ExecD IMPORT List,Node;
  8.  
  9. TYPE
  10.  KeyMapTypes=(shift,alt,control,downup,kmp4,dead,string,nop);
  11.  KeyMapTypeSet=SET OF KeyMapTypes;
  12.  
  13. CONST
  14.  noQual=KeyMapTypeSet{};
  15.  vanilla=KeyMapTypeSet{shift,alt,control}; (* note that SHIFT+ALT+CTRL is VANILLA *)
  16.  
  17. TYPE
  18. (* Dead Prefix Bytes *)
  19.  DeadPrefixBytes=(dpbMod,dpb1,dpb2,dpbDead);
  20.  DeadPrefixByteSet=SET OF DeadPrefixBytes;
  21.  
  22. CONST
  23.  dp2dIndexMask  = 0FH;  (* mask for index for 1st of two dead keys *)
  24.  dp2dFacShift   = 4;    (* shift for factor for 1st of two dead keys *)
  25.  
  26.  maxKeys=64;
  27.  
  28. TYPE
  29.  Types=ARRAY [0..maxKeys-1] OF KeyMapTypeSet;
  30.  TypesPtr=POINTER TO Types;
  31.  
  32.  KeyInfo=RECORD
  33.   CASE :INTEGER OF
  34.   |0: ch:ARRAY [0..3] OF CHAR;
  35.   |1: st:ADDRESS
  36.   END
  37.  END;
  38.  
  39.  Info=ARRAY [0..maxKeys-1] OF KeyInfo;
  40.  InfoPtr=POINTER TO Info;
  41.  
  42.  BitTable=ARRAY [0..maxKeys DIV (8*SIZE(LONGSET))-1] OF LONGSET;
  43.  BitTablePtr=POINTER TO BitTable;
  44.  
  45.  KeyMap=RECORD
  46.   loKeyMapTypes:TypesPtr;
  47.   loKeyMap:InfoPtr;
  48.   loCapsable:BitTablePtr;
  49.   loRepeatable:BitTablePtr;
  50.   hiKeyMapTypes:TypesPtr;
  51.   hiKeyMap:InfoPtr;
  52.   hiCapsable:BitTablePtr;
  53.   hiRepeatable:BitTablePtr;
  54.  END;
  55.  KeyMapPtr=POINTER TO KeyMap;
  56.  
  57.  KeyMapNode=RECORD
  58.   node:Node; (* including name of keymap *)
  59.   keyMap:KeyMap;
  60.  END;
  61.  
  62. (* the structure of keymap.resource *)
  63.  KeyMapResource=RECORD
  64.   node:Node;
  65.   list:List; (* a list of KeyMapNodes *)
  66.  END;
  67.  
  68. END KeyMapD.
  69.