DIRECTORY KeyMappingTypes, KeyTypes; KeyMapping: CEDAR DEFINITIONS ~ BEGIN KeySym: TYPE = KeyTypes.KeySym; KeyCode: TYPE = KeyTypes.KeyCode; Mapping: TYPE ~ KeyMappingTypes.Mapping; KeySyms: TYPE ~ REF READONLY KeySymsRep; KeySymsRep: TYPE ~ RECORD [SEQUENCE n: BYTE OF KeySym]; KeyTable: TYPE ~ REF KeyTableRep; KeyTableRep: TYPE ~ ARRAY KeyCode OF REF KeySymsRep; KeyCodes: TYPE ~ REF READONLY KeyCodesRep; KeyCodesRep: TYPE ~ RECORD [SEQUENCE n: NAT OF KeyCodeIndexPair]; KeyCodeIndexPair: TYPE ~ PACKED RECORD [keyCode: KeyCode, glyphIndex: BYTE]; CountKeySyms: PROC [mapping: Mapping, keyCode: KeyCode] RETURNS [count: NAT]; GetKeySym: PROC [mapping: Mapping, keyCode: KeyCode, i: NAT] RETURNS [keySym: KeySym]; GetKeySyms: PROC [mapping: Mapping, keyCode: KeyCode] RETURNS [keySyms: KeySyms]; KeyCodesFromKeySym: PROC [mapping: Mapping, keySym: KeySym] RETURNS [keyCodes: KeyCodes]; WalkKeySymsProc: TYPE ~ PROC [keySym: KeySym] RETURNS [done: BOOL ¬ FALSE]; WalkKeySyms: PROC [mapping: Mapping, walkProc: WalkKeySymsProc] RETURNS [aborted: BOOL ¬ FALSE]; NewMapping: PROC [keyTable: KeyTable, maxCode: KeyCode ¬ KeyCode.LAST] RETURNS [mapping: Mapping]; END. ²KeyMapping.mesa Copyright Σ 1992 by Xerox Corporation. All rights reserved. Christian Jacobi, February 13, 1992 11:37 am PST Christian Jacobi, February 19, 1992 9:47 am PST Mapping between keycodes and keysyms. Returns the number of glyphs on the key whose number is keyCode. If there is no key numbered keyCode, count will be 0. Returns the ith glyph on the key whose number is keyCode. Returns the keysyms on the key whose number is keyCode. May return empty sequence but never NIL. Inverse of GetKeySym. May return empty sequence but never NIL. Find all of the KeySyms mentioned in mapping. If the walkProc ever returns done=TRUE, WalkKeySyms will stop and return TRUE; otherwise it returns FALSE. Creates a mapping between keyCodes and keySyms. Client must not change keyTable data structures after they are passed in. maxCode is the highest valid KeyCode; providing this value allows some internal performance optimizations. ΚY–(cedarcode) style•NewlineDelimiter ˜code™Kšœ Οeœ2™=K™0K™/K™K™%K™—KšΟk œ˜$K˜KšΟn œžœž œ˜Kšž˜K˜Kšœžœ˜Kšœ žœ˜!Kšœ žœ˜(K˜Kšœ žœžœžœ ˜(š œ žœžœžœžœžœ ˜7K˜—Kšœ žœžœ ˜!š œ žœžœ žœžœ ˜4K˜—Kšœ žœžœžœ ˜*Kš œ žœžœžœžœžœ˜Aš œžœžœžœ žœ˜LK˜—K˜šŸ œžœ&žœ žœ˜MKšœw™wK™—šŸ œžœ)žœžœ˜VKšœ Οuœ*™9K™—šŸ œžœ&žœ˜QKšœ7™7Kšœ(™(K™—šŸœžœ$žœ˜YKšœ™Kšœ(™(K˜—Kš œžœžœžœžœžœ˜Kš Ÿ œžœ/žœ žœžœ˜`Kšœ-™-Kšœj™jK˜—šŸ œžœ1žœžœ˜bKšœζ™ζK˜—Kšžœ˜K˜—…—š ₯