Support - WebTerm X - remapping the keyboard

WebTerm X Frequently Asked Questions

How do I re-map the X keyboard?

While WebTerm X provides no internal way to re-map users' keyboards, you can use standard host keyboard mapping methodologies on each user's account.  Xev and xmodmap are used for this purpose.

The xev client is used to keep track of events, packets of information that are generated by the server when actions occur and are interpreted by other clients. Moving the pointer or pressing a keyboard key cause input events to occur. The command is xev. Within the xev window is a small box. Move the pointer inside this box. When you type a key inside the box, information about the keysym and keycode will appear. This information will be displayed in the xterm window from which you started xev. The relevant information will look like this

. . . keycode 127 (keysym 0xffe7, Meta_L) . . .

Yes you can change the settings on keys. You will need to use XMODMAP to change the keys.

The best thing to do it to re-map the keys. You can do this on the Host side using the command xmodmap.

The xmodmap client is generally used to map key functions to physical keys on the keyboard. Xmodmap is used to assign "modifier" key functions to physical keys. Hence, xmodmap can be used to specify what character is generated when you press a key or what action happens when you press a pointer button. The main function of xmodmap is to allow you to assign these important modifier key-name functions. Another helpful function of xmodmap allows you to assign the function of any key on the keyboard to any other key. Thirdly, xmodmap can reassign logical pointer button functions to other physical buttons.

Before mapping keys it is a good idea to save a map of the default assignments. Running xmodmap -pke prints the current map.

First How to assign and remove keysysms as modifier keynames recognized by X.

clear MODIFIERNAME

This command removed all entries in the modifier map for the given modifier. For example, the expression clear Lock will remove all keys that were bound to the lock modifier.

add MODIFIERNAME = KEYSYMNAME

This command adds the given keysym to the indicated modifier map. For example, you could make the Alt key an additional shift modifier key.

remove MODIFIERNAME = KEYSYMNAME

This command removed the given keysym from the modifier map. Hence, it un-maps it. For example, remove Caps_Lock as the modifier key. The bonus of using this command is the keysym names are evaluated as the line is read in. This allows you to remove keys from a modifier without having to worry about whether they have been reassigned.

Second, Map any keysym (function) to any physical key

keycode NUMBER = KEYSYMNAME

This command assigns the keysysm to the indicated keycode (which may be specified in decimal, hex, or octal). Usually only one keysym is assigned to a given code.

keysym KEYSYMNAME = KEYSYMNAME

This command assigns the keysym on the right to the keycode of the keysym on the left. Please note if you have the same keysym bound to multiple keys, this might not work.

Please remember before you change the modifier keynames to physical keys you must first remove that key from the current modifier map.

If you wish to have further information there are two great sources. While connected to the host you can type in man and xmodemap. It will give you detailed information. Second you could purchase or rent the book "X Windows System User's Guide" by Valerie Quercia and Tim O'Reilly.

A method that is simpler for the user (because it runs automatically) is to create a keyboard file for them in their default directory on a particular host. 

 

Should you have any questions or issues please use our Support Request Form

NOTE: For discontinued products or products no longer in development, contact Sales at 603.880.9118 or via e-mail at: sales@powerlan-usa.com.

Copyright © 2003 Powerlan Ltd.