<> <> <> <> <> TerminalDefs: CEDAR DEFINITIONS ~ BEGIN KeyName: TYPE ~ MACHINE DEPENDENT { x0(0), -- unused x1(1), -- unused x2(2), -- unused x3(3), -- unused x4(4), -- unused x5(5), -- unused x6(6), -- unused Pen(7), -- Pen switch, for graphics tablet Keyset1(8), -- Alto keyset 1 (leftmost) Keyset2(9), -- Alto keyset 2 Keyset3(10), -- Alto keyset 3 Keyset4(11), -- Alto keyset 4 Keyset5(12), -- Alto keyset 5 (rightmost) Red(13), -- Mouse, left button Blue(14), -- Mouse, right button Yellow(15), -- Mouse, middle button <<>> Five(16), -- 5 and % Four(17), -- 4 and $ Six(18), -- 6 and ~ E(19), Seven(20), -- 7 and & D(21), U(22), V(23), Zero(24), -- 0 and ) K(25), Dash(26), -- Alto - and , DLion - P(27), Slash(28), -- / and ? BackSlash(29), -- Alto \ and |, DLion DEFAULTS (top row, right end) LF(30), -- Alto LF (upper right), DLion COPY (left group) BS(31), -- Alto BS (upper right), DLion _ (large key, upper right) <<>> Three(32), -- 3 and # Two(33), -- 2 and @ W(34), Q(35), S(36), A(37), Nine(38), -- 9 and ( I(39), X(40), O(41), L(42), Comma(43), -- , and < Quote(44), -- ' and " (close quotes on DLion) RightBracket(45), -- ] and } Spare2(46), -- Alto "Next" (blank key right of RETURN), DLion KEYBOARD (right group) Spare1(47), -- Alto "Look" (blank key right of BS), DLion UNDO (right group) <<>> One(48), -- 1 and ! ESC(49), -- Alto ESC (upper left), DLion CENTER (top row, left end) TAB(50), -- Alto TAB, DLion (large key left of Q) F(51), Ctrl(52), -- Alto CTRL (large key left of A), DLion OPEN (left group) C(53), J(54), B(55), Z(56), LeftShift(57), -- SHIFT, lower left Period(58), -- . and > SemiColon(59), -- ; and : Return(60), -- Alto RETURN, DLion (double-height key, right side) Arrow(61), -- Alto _ and ^, DLion open quotes DEL(62), -- Alto DEL, DLion DELETE (left group) Move(63), -- DLion MOVE (left group) <<>> R(64), T(65), G(66), Y(67), H(68), Eight(69), -- 8 and * N(70), M(71), Lock(72), -- LOCK (Alto lower left corner, DLion left of A) Space(73), -- the space bar LeftBracket(74), -- [ and { Equal(75), -- = and + RightShift(76), -- SHIFT, lower right Spare3(77), -- Alto "Swat" (blank key lower right corner), DLion STOP (red key, right group) Props(78), -- DLion PROP'S (left group) SkipNext(79), -- DLion SKIP/NEXT (right group) <<>> Margins(80), -- DLion MARGINS (right group) x81(81), -- unused x82(82), -- unused x83(83), -- unused x84(84), -- unused x85(85), -- unused x86(86), -- unused x87(87), -- unused x88(88), -- unused Same(89), -- DLion SAME (left group) Find(90), -- DLion FIND (left group) Again(91), -- DLion AGAIN (left group) Help(92), -- DLion HELP (right group) DefnExpand(93), -- DLion DEF'N/EXPAND (right group) x94(94), -- unused x95(95), -- unused <<>> x96(96), -- unused RightArrow(97), -- DLion (upper left corner, engraved with right-pointing arrow) x98(98), -- unused Bold(99), -- DLion BOLD (top row) Italics(100), -- DLion ITALICS (top row) Underline(101), -- DLion UNDERLINE (top row) Superscript(102), -- DLion SUPERSCRIPT (top row) Subscript(103), -- DLion SUBSCRIPT (top row) LargerSmaller(104), -- DLion LARGER/SMALLER (top row) x105(105), -- unused x106(106), -- unused x107(107), -- unused Font(108), -- DLion FONT (right group) x109(109), -- unused x110(110), -- unused x111(111) -- unused }; BW: KeyName ~ Spare1; Look: KeyName ~ Spare1; Next: KeyName ~ Spare2; Swat: KeyName ~ Spare3; FL1: KeyName ~ DEL; FL2: KeyName ~ LF; FL3: KeyName ~ Move; FL4: KeyName ~ Props; FR1: KeyName ~ Spare3; FR2: KeyName ~ BackSlash; FR3: KeyName ~ Arrow; FR4: KeyName ~ Spare2; FR5: KeyName ~ SkipNext; <> DownUp: TYPE ~ MACHINE DEPENDENT {down(0), up(1)} _ up; <> KeyBits: TYPE ~ PACKED ARRAY KeyName OF DownUp; <> KeyState: TYPE ~ RECORD[ SELECT OVERLAID * FROM bits => [bits: KeyBits], words => [words: ARRAY [0..SIZE[KeyBits]) OF WORD], ENDCASE ]; <> <<(Note: for this to work well, the KeyBits type must occupy a whole number of words.)>> <<>> Position: TYPE ~ MACHINE DEPENDENT RECORD [x, y: INTEGER]; <> <<>> Cursor: TYPE ~ ARRAY [0..16) OF WORD; <> <<>> Background: TYPE ~ MACHINE DEPENDENT {white(0), black(1)}; < normal (black on white) view of bitmap (0=>white, 1=>black);>> < inverted (white on black) view of bitmap (0=>black, 1=>white);>> <<>> END.