Event Bindings

eventmap section is used to bind editor commands to user events.

# Keybindings

Keybindings are inherited from parent modes unless overriden.

Here are some examples of key specifiactions:

[A]
  Uppercase a
[a]
  Lowercase a
[;]
  Semicolon
[A+A]
  Alt+A
[C+B]
  Ctrl+B
[A+C+F1]
  Alt+Ctrl+F1
[A+C+S+F1]
  Alt+Ctrl+Shift+F1
[A+Space]
  Alt+Space
[C+K_C+B]
  Ctrl+K and then Ctrl+B (two keys)
[C+A_C+B_C+C]
  Ctrl+A Ctrl+B Ctrl+C must be pressed in sequence.
[G+-]
  Gray -
[G++]
  Gray +
[C-S-X]
  X, ignore the state of Ctrl and Shift keys.
[C+\\]
  Ctrl+Backslash
[C+\[]
  Ctrl+[
[C+G-Left]
  Ctrl+Left, ignore difference between the two Left keys.
[C+A-A]
  Ctrl+A, ignore the state of Alt key.

The following special keys are available (case sensitive):

F1-F12 Home End PgUp PgDn Insert Delete Up Down Left Right Enter Esc BackSp Space Tab Center

Keyname can be preceeded by modifiers (A, C, G, S). If modifier is followed by a + (plus), the modifier key must be pressed to match the key specification. If the modifier key is followed by - (minus), the state of the modifier key is ignored.

Multiple-key combinations can be specified by separating them with _ (underline)

Keys are bound using the key command:

key [keyspec] { editor commands }

ASCII characters >= 32 are bound to TypeChar by default.

Any number of commands can be bound to a key combination or menu item. They are executed in sequence until one of them fails.

See ui_fte.fte configuration file for examples and default configuration.

# Abbreviations

Abbreviations are used to automatically replace some text or run an editor macro when some word is typed in. When a non-word character is entered, the previous word is searched for in the list of abbreviations. When it is found, it is either replaced with a new string or a macro is executed.

Syntax:

    abbrev 'old-word' 'new-string'

    abbrev 'old-word' { Macro }

Some examples of abbreviations:

        abbrev 'wcsw' 'WinCreateStdWindow';

        abbrev 'ifx' {
            KillWordPrev; InsertString 'if () {'; LineIndent; LineNew;
            InsertString '}'; LineIndent;
            MoveUp; MoveLineEnd; 3:MoveLeft;
            Fail; # do not insert typed character
        }

The first one defines a replacement string, while the second one defines an editor macro to be run.

For abbreviations to work, setting Abbreviations must be set to 1 for active mode.

# EventMap Settings

## MainMenu

"menu"

Main menu displayed when editing in this mode.

## LocalMenu

"menu"

Local menu used when editing in this mode.