
! File:             sunxterm.xmodmaps
! Purpose:          X keycode -> keysym mappings
! Original Author:  John Williams Sussex University, May 14 1993
! Much extended by:    A.Sloman July 19th 1993
! Documentation:    See below
! Related Files:    sunxterm.keytrans

! KeySym definitions for Sun type-5 keyboards.
! (One missing still for keycode 22, because I have not yet found
! an unused keysym!)

! Normally run from the xclients file at start up, see xmodmap(1).
! (or .xinitrc, or .xstart, etc.). Use shell command of the form
!       xmodmap <filename>
! where this file is stored as <filename>

!! Note some of the defaults that are set up in any case by "xterm" are
!! given below preceded by "!!" to make it easy for users to change the
!! defaults by uncommenting and altering the mapping.

! The type-5 keyboard has a keypad not present on type-4 keyboards.
! X11R5 Xsun(1) has no KeySyms for these, so we define them here.

!!!!! Arrow keys in lower central keypad !!!!!
keycode  27 = Up
keycode  31 = Left
keycode  34 = Down
keycode  35 = Right

!!!!! REMOVE THE NEXT FOUR IF YOU WISH ARROW KEYS TO BE DUPLICATED     !!!!!
!!!!! Make arrow keys in right hand numeric keypad be different        !!!!!
!!!!! Make keys 8 4 6 and 2 on keypad be R8 R10 R12 R14                !!!!!
!!!!!       = F28, F30, F32, F34                                       !!!!!
!!!!! (To distinguish them from the arrow keys in middle lower keypad) !!!!!
keycode 76  = R8
keycode 98  = R10
keycode 100 = R12
keycode 120 = R14


!!!!! Keys in upper central keypad !!!!!
keycode  51 = Insert
!! (Del key already works)
!! keycode 73 = Delete
keycode  59 = Home
keycode  81 = End
! Page Up key
keycode 103 = Prior
! Page Down key
keycode 130 = Next


! Swap Caps_Lock and Control_L
! amazingly, this even fixes the Caps Lock LED on an NCD Xterminal
remove Lock = Caps_Lock
remove Control = Control_L
keysym Control_L = Caps_Lock
keysym Caps_Lock = Control_L
add Lock = Caps_Lock
add Control = Control_L
!keycode 126 = Caps_Lock
!keycode 83 = Control_L
keycode 95 = backslash bar
keycode 49 = grave asciitilde

! Two function keys don't seem to have mappings by default
keycode 16 = F11
keycode 18 = F12

!!!!! The type-5 keyboard lacks a "Linefeed" key,       !!!!!
!!!!! so we redefine the "AltGraph" to send "Linefeed". !!!!!
! NB it does not auto-repeat
keycode  20 = Linefeed


!!!!! Some Sun defaults (odd ones) on Type 5 keyboard !!!!!
!!!!! Change these if you wish                        !!!!!
!!  Pause (28) is already defined as R1
!!  Print Screen (29)             as R2
!!  Scroll Lock (30)              as R3
!!  "/" (53)                      as R5
!!  "*" (54)                      as R6
!! keycode 28 = R1
!! keycode 29 = R2
!! keycode 30 = R3
!! keycode 53 = R5
!! keycode 54 = R6
!! keycode 105 = Num_Lock

! Is this set by default ??
! The top right keypad key with "-"
keycode 78 = KP_Subtract

!! Default keypad "+"
!! keycode 132 = KP_Add

!! Default keypad Enter
!! keycode 97 = KP_Enter

!!!!! BOTTOM OF NUMERIC KEYPAD !!!!!
! The "Ins" and "Del" keys (on the right keypad) normally send the same
! KeySyms as the middle "Delete" and "Insert" keys.  We redefine them
! here to do something different

! The Ins key, with "0"
keycode  57 = KP_Decimal
! The Del key with "."
keycode 101 = KP_0


!!!!! SIMULATING THE TOP ROW OF SUN TYPE 4 KEYPAD !!!!!
! The top right row of 4 keys on the type-5 keybord are not defined.
! Here we set them to replace the keys on the right bank on a type-4,
! removed on the type-5, though in a slightly different order.
! [!] key (With picture of speaker crossed out) ("=" on Type 4 keyboard)
! Normally R4 (=F24) on Sun Type4.
keycode  52 = R4
! Half-moon - (R3 = F23)
keycode   9 = R3
! Half-moon + (R2 = F22)
keycode  11 = R2
! Circle with vertical line (R5 = F25)
keycode  55 = R5

!! NB the above duplicate some of the standard defaults and are
!! therefore wasteful, i.e. R2, R3, R5.


!!! OTHER DEFAULTS FOR INFORMATION !!!
!! Alt on left
!! keycode 26 = Alt_L
!! Diamond left
!! keycode 127 = Meta_L
!! Diamond right
!! keycode 129 = Meta_R
!! Compose
!! keycode 74 = Multi_Key


!! Blank key top left next to HELP key
! Can't find a suitable unused keysym to map it on to.
! keycode 22 = Hyper_L
