next up previous contents index
Next: The Define Macro Button: Up: The Key Map Button: Previous: The Key Map Button:   Contents   Index


Key Mapping File

The file produced in this manner contains all key mapping and action translation tables used by Xic. Although it is not really recommended, this file can be customized by the user, with a text editor. The recommended way to alter a key sequence response is with a macro (see below), but there may be occasions where the mapping file should be changed to achieve a desired effect. Contact Whiteley Research for assistance.

The name of the file is xic_keymap.hostname, where hostname is the name of the machine. When Xic starts, it looks for a file of this name in the current directory, then in the user's home directory, then in the library search path. If a file is found, it is read and processed.

The first section of the mapping file contains a listing of the keysyms for the special keys mapped with this command (Home, Page Down, etc.). The keysym is a system-defined number assigned to that key. In Unix/Linux, keysyms are defined in the X include file X11/keysymdef.h.

The next section of the file consists of the definition of the ``macro suppression'' character (described below). This must be a printable ASCII character, surrounded by single quotes.

The third section contains a mapping table for keysyms to an internal code. The first column contains the keysyms; a numeric value in Windows, or the standard name under Unix/Linux. The second column is the internal code. The third column is a subcode used only for function keys.

The next section contains an action table which maps actions before the keypress code is sent to any internal command in Xic. In action tables, the first column is a code which is either an internal code, or the ASCII value of the keysym. This is operating system dependent. Under Unix/Linux, the keysym code for a printing character is simply the ASCII value of that character. The internal code is interpreted numerically as a value (hex) 0 - 1f. Ascii values are (hex) 20 - fe. Other values are taken as keysyms. Under Windows, the code is similar, but the Windows keysym is used. The Windows keysym differs in that (1) the upper-case alpha characters must be specified rather than lower case, (2) for punctuation which is the Shift of a numeric key, the numeric key should be given, (3) for punctuation which is not a Shift value for a numeric key, a special keysym for that key should be given.

The second column is the modifier state. The actions should be listed in order of most specific to least specific with regard to modifiers. A value ``0'' in this column indicates ``don't care''. Otherwise, the entry consists of one or more of ``SHIFT'', ``CTRL'', and ``ALT'', separated by a minus sign `-'. The actual modifier should be listed, even if a Shift state is implied by the value in column one.

For example, to select the `!' character, in Unix/Linux one has

'!'        SHIFT
in Windows, this would be
'1'        SHIFT

The third column in the action tables is the name of an action, which is defined internally in Xic. This is the action performed when the keypress combination specified in columns one and two is detected.

The next section in the file is an action table that specifies actions to perform after the present Xic command processes the keypress. Many of the Xic commands look for specific keys, and if that key is seen, further mapping is inhibited. If the keypress is not used by the command, it is available for translation by this final table.

The last section of the file contains a ``< Buttons> '' field which maps the functions of the mouse buttons under Unix/Linux. This allows the functions of the buttons within Xic to be permuted. However, the functions of the buttons with respect to the user interface, such as the mouse button used to engage user interface buttons and menu items, will not change. This field is ignored under Windows.


next up previous contents index
Next: The Define Macro Button: Up: The Key Map Button: Previous: The Key Map Button:   Contents   Index
Stephen R. Whiteley 2017-03-22