Next: Cut Buffer Commands, Previous: Window Groups, Up: Use with X Windows [Contents][Index]
Each X key event is translated into a canonical input representation, a key-event. The X key event consists of a scan-code and modifier bits, and these translate to an X keysym. This keysym and the modifier bits map to a key-event.
If you type a key with a shift key held down, this typically maps to a distinct X keysym. For example, the shift of 3 is #, and these have different X keysyms. Some keys map to the same X keysym regardless of the shift bit, such as Tab, Space, Return, etc. When the X lock bit is on, the system treats this as a caps-lock, only mapping keysyms for lowercase letters to shifted keysyms.
The key-event has a keysym and a field of bits. The X keysyms map directly to the key-event keysyms. There is a distinct mapping for each CLX modifier bit to a key-event bit. This tends to eliminate shift and lock modifiers, so key-events usually only have control, meta, hyper, and super bits on. Hyper and super usually get turned on with prefix key-events that set them on the following key-event, but you can turn certain keys on the keyboard into hyper and super keys. See the X manuals and the Hemlock Command Implementor’s Manual for details.
The system also maps mouse input to key-events. Each mouse button has distinct key-event keysyms for whether the user pressed or released it. For convenience, Hemlock makes use of an odd property of converting mouse events to key-events. If you enter a mouse event with the shift key held down, Hemlock sees the key-event keysym for the mouse event, but the key-event has the super bit turned on. For example, if you press the left button with the shift key pressed, Hemlock sees S-Leftdown.
Note that with the two button mouse on the IBM RT PC, the only way to to send Middledown is to press both the left and right buttons simultaneously. This is awkward, and it often confuses the X server. For this reason, the commands bound to the middle button are also bound to the shifted left button, S-Leftdown, which is much easier to type.
Next: Cut Buffer Commands, Previous: Window Groups, Up: Use with X Windows [Contents][Index]