edt: Sun workstations
4.1 Sun Workstations Running X
==============================
Some earlier Sun keyboards do not have arrow keys separate from the
keypad keys. It is difficult to emulate the full EDT keypad and still
retain use of the arrow keys on such keyboards.
The Sun Type 5 and other more recent Sun keyboards, however, do have
separate arrow keys. This makes them candidates for setting up a
reasonable EDT keypad emulation.
Depending upon the configuration of the version of X installed on
your system, you may find the default X keynames for the keypad keys
don’t permit Emacs to interpret some or all the keypad keys as something
other than arrow keys, numeric keys, <Home>, <PageUp>, etc. Both Sun
and HP have been particularly guilty of making bizarre keysym
assignments to the keypad keys.
In most cases, the X Windows command, ‘xmodmap’, can be used to
correct the problem. Here’s a sample ‘.xmodmaprc’ file which corrects
this problem on one Sun workstation configuration using an older SunOS
release configured with a Sun Type 5 keyboard:
! File: .xmodmaprc
!
! Set up Sun Type 5 keypad for use with the Emacs EDT Emulation
!
keycode 53 = KP_Divide
keycode 54 = KP_Multiply
keycode 57 = KP_Decimal
keycode 75 = KP_7
keycode 76 = KP_8
keycode 77 = KP_9
keycode 78 = KP_Subtract
keycode 97 = KP_Enter
keycode 98 = KP_4
keycode 99 = KP_5
keycode 100 = KP_6
keycode 101 = KP_0
keycode 105 = F24
keycode 119 = KP_1
keycode 120 = KP_2
keycode 121 = KP_3
keycode 132 = KP_Add
If ‘edt-mapper.el’ does not recognize your keypad keys as unique
keys, use the command ‘xmodmap -pke’ to get a listing of the actual key
codes and the keysyms mapped to them and then generate you own custom
‘.xmodmaprc’ similar to the one above.
Next, feed ‘.xmodmaprc’ to the ‘xmodmap’ command and all the Sun Type
5 keypad keys will now be configurable for the emulation of an LK-201
keypad (less the <,> key). In this example, the line
keycode 105 = F24
changes the X Windows name of the keypad <NumLock> key to be known
internally as the <F24> key. Doing so permits it to be configured to
behave as the <PF1> (<GOLD>) key.
The side effect of this change is that you will no longer have a
<NumLock> key. If you are using other software under X which requires a
<NumLock> key, then examine your keyboard and look for one you don’t use
and redefine it to be the <NumLock> key. Basically, you need to clear
the <NumLock> key from being assigned as a modifier, assign it to the
key of your choice, and then add it back as a modifier. (Unix
for further help on how to do this.)