Advanced Help for Keyboard Set Up


This page provides extra help in setting up your keyboard for EDT. If the default key-pad maps provided in the download package are not quite right for your keyboard, or if the automatic key-pad setup process did not produce a perfect configuration, then you can manually set up or adjust your configuration with the following techniques.

The key-pad configuration file used by EDT contains more than dozen lines similar to:

<key_set   function="Delete_Word"   key="86"   mapto="F9"   returns="27 91 50 48 126" />
The angle-brackets enclose information for each key as XML key_set tags with attributes. There is one XML tag line for each control key that EDT needs. You can edit this XML file with any text-editor.

The first attribute, function, is set to one of 15 keywords which identify the control keys needed by EDT. The names are fairly obvious, such as the example above, which designates the key to be used for delecting (or un-deleting) whole words. On modern PC keyboards, typically the key-pad's plus (+) key is assigned to this function.

The next two attributes, key and mapto, are used in X11 windowing systems to assign a specific logical key-function, to a physical key on your keyboard. If you are not accessing EDT from an X11 interface, such as from Cygwin under MS-Win, then set key="0" mapto="". Otherwise, on X11, the key attribute identifies a physical key on your keyboard, and the mapto attribute assigns it to a logical key-name. Once assigned, the key will then return the value corresponding to that name. (EDT calls xmodmap to make these assignments.)

There are many types of keyboards, and their key-codes differ. To determine the physical code returned by specific keys on your keyboard, run xev, and press the key in question (while mouse has the XEV window focus). XEV will display in your text window something like this:

	KeyPress event, serial 54, synthetic NO, window 0x400081,
	    root 0x9a, subw 0x0, time 93854073, (136,5), root:(116,30),
	    state 0x0, keycode 86 (keysym 0xffc6, F9), same_screen YES,
Look for the keycode identifier, and note the number following it. That number is to be placed as the value for the key attribute. The mapto values must be unique to distinguish the 15 control keys from each other. I suggest using functions that are not being used for anything else, while using EDT. Obviously they should be function or control keys, which return multi-byte escape codes; not regular alpha-numeric keys. (If you did set a function key as an alpha-numeric key, it would deny your ability to use that key in text!)

Finally, the returns attribute lists the character values actually returned by the selected key to running programs, such as EDT, after passing through the windowing system's keyboard interface (if any). The simple keypress.c utility is a handy way to see what codes your keyboard is returning. (You may need to right-click that link to save-as.) Compile and run it, as instructed in the program's comment-header. As you press each key, it will show you the number-codes returned. Basic letter keys will return a single asci code, but function and control keys will return a small group of numbers for each key-press. Write these down. These values are to be placed in the value of the returns attribute for the control keys you wish to use.

With this information, you should be able to configure your keyboard however you prefer.


Back to EDT                                         SourceForge.net Logo