next up previous contents index
Next: Grid Registers Up: Technology File Attributes Previous: Grid and Edge Snapping   Contents   Index


Function Key Assignments

It is possible to map the keyboard function keys to Xic operations. The function key assignments are sensitive to the Shift, Control, and Alt keys. This means that a function key (F1 - F12) press can have different effects depending on the state of these keys.

FNKey text
The N is an integer in the range 1-12, to correspond to the F1 - F12 function keys found on most keyboards.

The text has the form

[<tok>] cmd [<tok> cmd] ...

Each tok is a combination of the letters s, c, and a. The presence of the letters indicates that Shift, Control and Alt are pressed, respectively. The tok is surrounded by angle brackets.

Examples:

<s>
The Shift key is pressed, Control and Alt are not pressed.
<ca>
The Control and Alt keys are pressed, the Shift key is not pressed.

These tokens are followed by a cmd, which is a command. If the command starts with `!', the remainder is treated as a ``bang'' command (see 19). Otherwise, the text is the five-character (or fewer) command keyword associated with GUI command buttons. If the cmd contains white space, it must be quoted.

The command keywords are displayed in the pop-up ``tooltip'' which appears when the mouse pointer is positioned over a command button, after a short delay. This is the internal name for the command, which is generally a short mnemonic of five characters or fewer. The keywords are also generally provided in the help system topic describing the command. In the User Menu, for user scripts, the name which appears on the menu button is the appropriate name to use.

The first tok is generally absent, and the cmd applies to the function key with no modifiers pressed.

Example:

F1Key box <s> "!exec /path/to/myscript.scr" <c> !!Clear(0) <sca> polyg

The terms are:

F1Key
We're setting the F1 key in this example.

box
This indicates that when F1 is pressed without pressing a modifier key, the ``box'' command from the side menu wil be started.

<s> "!exec /path/to/myscript.scr"
This specifies that when Shift-F1 is pressed, the script in the myscript.scr file will be executed, using the !exec bang command. Since the command contains a space character, it is quoted.

<c> !!Clear(0)
This specifies that when Control-F1 is pressed, the Clear() script function is called with argument 0. This will clear the database. Note that the single/double exclamation point syntax is the same as is accepted on the command line.

<sca> polyg
When Shift, Control, and Alt are pressed along with F1, the ``polyg'' polygon creation command from the side menu is started.

The menu containing the named button must be active (not grayed) for the function key to have effect. The mappings are completely defined by the user -- there are no defaults. Pressing an unmapped function key has no effect on Xic. Be aware that the window manager in use, and the GTK toolkit, may map functions keys, and this may have higher priority than the mapping assigned here. The use of the Alt key is generally not a good idea, as it is commonly assigned for other purposes. Sometimes, an assignment will simply be ignored for some reason. For example, on one system Control-F1 is never returned, but Control works fine with other function keys.


next up previous contents index
Next: Grid Registers Up: Technology File Attributes Previous: Grid and Edge Snapping   Contents   Index
Stephen R. Whiteley 2017-10-02