Lugaru's Epsilon
Programmer's
Editor 14.04

Context:
Epsilon User's Manual and Reference
   Epsilon Extension Language
      . . .
      Constant Expressions
      Global Definitions
         Key Tables
         Color Classes
         Function Definitions
      Differences Between EEL And C
      . . .

Previous   Up    Next
Global Definitions  Epsilon Extension Language   Color Classes


Epsilon User's Manual and Reference > Epsilon Extension Language > Global Definitions >

Key Tables


keytable-definition:
        keytable keytable-list ;

keytable-list:
        identifier
        identifier , keytable-list

A key table is a set of bindings, one for each key on the keyboard, with keys modified by control, alt, and shift counted as separate keys. Various mouse actions and system events are also represented by special key codes. Each entry in the key table contains a short integer, which is an index into the name table. In other words, each entry corresponds to a named Epsilon object, either a command, subroutine, keyboard macro, or another key table.

You can declare a key table by using the keytable keyword in place of the type specifier in a global variable definition. A key table definition can contain no initialization, just keytable followed by a list of comma-separated key table names and a semicolon. A key table acts like an array of short ints, but you can also use it in the on part of a function definition (as described below).

Key codes, the values that index a key table, can be very large numbers. Looping through all possible key codes with a simple for (i = 0; i < MAXKEYS; i++) statement is far too slow; see Binding Primitives for the right way to write such loops.



Previous   Up    Next
Global Definitions  Epsilon Extension Language   Color Classes


Lugaru Epsilon Programmer's Editor 14.04 manual. Copyright (C) 1984, 2021 by Lugaru Software Ltd. All rights reserved.