Lugaru's Epsilon
Programmer's
Editor

Context:
Epsilon User's Manual and Reference
   Commands by Topic
      . . .
      Simple Customizing
         Bindings
         Brief Emulation
         CUA Keyboard
         . . .
         Command Files
      Advanced Topics
         Changing Commands with EEL
         Updating from an Old Version
         Keys and their Representation
            Mouse Keys
         Customizing the Mouse
      Miscellaneous

Previous   Up    Next
Updating from Epsilon 4  Commands by Topic   Mouse Keys


Epsilon User's Manual and Reference > Commands by Topic > Advanced Topics >

Keys and their Representation

This section describes the legal Epsilon keys, and the representation that Epsilon uses when referring to keys and reading command files. The key representation used when writing extension language programs appears in Keys.

Epsilon recognizes hundreds of distinct key combinations you can type on the keyboard (including control and alt keys). You can bind a command to each of these keys. Each key can also function as a prefix key, allowing even more key combinations. By default, Ctrl-X and Ctrl-C serve as prefix keys.

First, the keyboard provides the standard 128 ASCII characters. All the white keys in the central part of the PC keyboard, possibly in combination with the Shift and Control keys, generate ASCII characters. So do the <Esc>, <Backspace>, <Tab>, and <Enter> keys. They generate Control [, Control H, Control I, and Control M, respectively. Depending upon the national-language keyboard driver in use, there may be up to 128 additional keys available by pressing various combinations of Control and AltGr keys, for a total of 256 keys.

 <Ins>  <Insert>    
 <End>      
 <Down>      
 <PgDn>  <PageDn>  <PgDown>  <PageDown>
 <Left>      
 <Right>      
 <Home>      
 <Up>      
 <PgUp>  <PageUp>    
 <Del>  <Delete>    

You can get an additional 256 keys by holding down the Alt key while typing the above keys. In Epsilon, you can also enter an Alt key by typing an <Esc> before the key. Similarly, the Control-^ key says to interpret the following key as if you had held down the Control key while typing that key.

If you want to enter an actual <Esc> or Control-^ instead, type a Control-Q before it. The Ctrl-Q key "quotes" the following key against special interpretations. See Bindings.

In command files and some other contexts, Epsilon represents Control keys by C-<char>, with <char> replaced by the original key. Thus Control-t appears as C-T. The case of the <char> doesn't matter for control characters when Epsilon reads a command file, but the C- must appear in upper case. The Delete character (ASCII code 127) appears as C-?. Note that this has nothing to do with the key marked "Del" on the PC keyboard. The Alt keys appear with A- appended to the beginning of their usual symbol, as in A-f for Alt-f and A-C-h for Alt-Control-H.

Epsilon represents function keys by F-1, F-2, ... F-63. The F must appear in upper case. You can also specify the Shift, Control, and Alt versions of function keys, in any combination. In a command file, you specify the Shift, Control, and Alt versions with a prefix of S-, C-, or A-, respectively. For example, Epsilon refers to the key you get by holding down the Shift and Alt keys and pressing the F8 key as A-S-F-8.

Keys on the cursor keypad work in a similar way. Epsilon recognizes several synonyms for these keys, as listed in the table. Epsilon generally uses the first name listed, but will accept any of the names from a command file.

Epsilon normally treats the shifted versions of these keys as synonyms for the unshifted versions. When you press Shift-<Left>, Epsilon runs the command bound to <Left>. The commands bound to most of these keys then examine the Shift key and decide whether to begin or stop selecting text. (Holding down the shift key while using the cursor keys is one way to select text in Epsilon.)

Epsilon refers to the numeric keypad keys with the names given in the table.

 N-<Ins>  N-<Insert>  N-0    
 N-<End>  N-1      
 N-<Down>  N-2      
 N-<PgDn>  N-<PageDn>  N-<PgDown>  N-<PageDown>  N-3
 N-<Left>  N-4      
 N-5        
 N-<Right>  N-6      
 N-<Home>  N-7      
 N-<Up>  N-8      
 N-<PgUp>  N-<PageUp>  N-9    
 N-<Del>  N-<Delete>  N-.    

In a command file, you can also represent keys by their conventional names, by writing <Newline> or <Escape>, or by number, writing <#0> for the null character ^@, for example. Epsilon understands the same key names here as in regular expression patterns (see the table in Entering Special Characters).

Macros defined in command files may also use the syntax <!cmdname> to run a command cmdname without knowing which key it's bound to. For example, <!find-file> runs the find-file command. When you define a keyboard macro interactively and invoke commands from the menu bar or tool bar, Epsilon will use this syntax to define them, since there may be no key sequence that invokes the specified command.

 Specific Key  Becomes Generic Key
 <NumPlus>  +  
 <NumMinus>  -  
 <NumStar>  *  
 <NumSlash>  /  
 <NumEqual>  =  
 <EnterKey>  <Enter>  (on main keyboard)
 <NumEnter>  <Enter>  (on numeric keypad)
 <BackspaceKey>  <Backspace>  
 <TabKey>  <Tab>  
 <EscapeKey>  <Esc>  
 <Spacebar>  <Space>  

Several keys on the PC keyboard act as synonyms for other keys: the grey keys *, -, and + by the numeric keypad, and the <Backspace>, <Enter>, <Tab>, and <Esc> keys, for example. The first three act as synonyms for the regular white ASCII keys, and the other four act as synonyms for the Control versions of "H", "M", "I" and "[", respectively. Epsilon normally translates these keys to their synonyms automatically, and uses the binding of the synonym, but you can also bind them separately if you prefer, using the specific key names shown in the table.

Subtopics:

Mouse Keys



Previous   Up    Next
Updating from Epsilon 4  Commands by Topic   Mouse Keys


Lugaru Copyright (C) 1984, 2012 Lugaru Software Ltd. All Rights Reserved.