| 1 |
! This file contains keybindings for xterm to ensure that every key on the |
| 2 |
! keyboard (including all function keys, keypad keys, and freestanding arrow |
| 3 |
! keys etc.) produces some key sequence that may be recognised by Jove. The |
| 4 |
! file jove.rc.xterm then provides suggested translations from those key |
| 5 |
! sequences to Jove commands. Note: these resources are to be installed |
| 6 |
! on the X server and affect its keyboard and mouse. |
| 7 |
! |
| 8 |
! On Suns, xterm provides a choice of keybindings for the funcion keys, to |
| 9 |
! match the usual Sun bindings if XTerm*sunFunctionKeys is true and to match |
| 10 |
! VT220-like bindings otherwise. This file supports both modes. |
| 11 |
! |
| 12 |
! For keys which are not customarily bound at all in xterm, we have chosen |
| 13 |
! bindings in the Sun style, to minimise the possibility of accidentally |
| 14 |
! producing sequences that might be meaningful to some program. Thus it is |
| 15 |
! expected that existing applications using xterm will not be affected by |
| 16 |
! these bindings. |
| 17 |
! |
| 18 |
! This file may be incorporated in your .Xdefaults file, or kept as a separate |
| 19 |
! file to be invoked by xrdb (probably from within your .xinitrc). In either |
| 20 |
! case, the call of xrdb must be in the form |
| 21 |
! xrdb -merge -DSUN -DSUNKEYS -DJOVE -DXTERM=xjoveterm $HOME/.Xdefaults |
| 22 |
! where you should include |
| 23 |
! -DSUN on any Sun machine (to cope with the strange Sun bindings of |
| 24 |
! F11 and F12). |
| 25 |
! -DSUNKEYS to define the sunFunctionKeys resource and adjust other |
| 26 |
! bindings so that Sun keyboard sequences are generated |
| 27 |
! instead of the "standard" sequences. See xterm(1). |
| 28 |
! -DJOVE if you want full Jove mouse operations |
| 29 |
! (tells xterm to pass Ctrl-modified mouse events through) |
| 30 |
! -DXTERM=xjoveterm if the effects are only required when xterm is called by |
| 31 |
! the name 'xjoveterm' (or whatever), where 'xjoveterm' might be a |
| 32 |
! soft link to xterm. The combination of this facility with -DJOVE |
| 33 |
! is recommended. |
| 34 |
! |
| 35 |
! Alternatively, this file may be included in your XFILESEARCHPATH |
| 36 |
! or XUSERFILESEARCHPATH, or in the XENVIRONMENT variable, in which case it |
| 37 |
! must first be passed through cpp with -DSUN etc. as appropriate. |
| 38 |
! |
| 39 |
! If SUN is #defined, the CLIPBOARD is used for xterm-style cutting and |
| 40 |
! pasting, thus permitting cutting and pasting from cmdtool and textedit |
| 41 |
! windows. This may be overridden by #defining BUFFER (e.g. to CUT_BUFFER0). |
| 42 |
|
| 43 |
#ifndef XTERM |
| 44 |
#define XTERM XTerm |
| 45 |
#endif |
| 46 |
|
| 47 |
#ifndef BUFFER |
| 48 |
#ifdef SUN |
| 49 |
#define BUFFER CLIPBOARD |
| 50 |
#else |
| 51 |
#define BUFFER CUT_BUFFER0 |
| 52 |
#endif |
| 53 |
#endif |
| 54 |
|
| 55 |
#ifdef JOVE |
| 56 |
#define MOUSE_SPECIFIC \ |
| 57 |
!Ctrl <BtnDown>: ignore()\n \ |
| 58 |
!Ctrl <BtnUp>: ignore()\n \ |
| 59 |
~Ctrl ~Meta <Btn2Up>: insert-selection(PRIMARY,BUFFER)\n \ |
| 60 |
<BtnUp>: select-end(PRIMARY,BUFFER)\n |
| 61 |
#else |
| 62 |
#define MOUSE_SPECIFIC \ |
| 63 |
~Ctrl ~Meta <Btn2Up>: insert-selection(PRIMARY,BUFFER)\n \ |
| 64 |
<BtnUp>: select-end(PRIMARY,BUFFER)\n |
| 65 |
#endif |
| 66 |
|
| 67 |
#ifdef SUN |
| 68 |
#define SUNSPECIFIC \ |
| 69 |
<Key>L1: string(0x1B)string("[192z")\n \ |
| 70 |
<Key>L2: string(0x1B)string("[193z")\n \ |
| 71 |
<Key>Pause: string(0x1B)string("[208z")\n \ |
| 72 |
<Key>Print: string(0x1B)string("[209z")\n \ |
| 73 |
<Key>Scroll_Lock: string(0x1B)string("[210z")\n |
| 74 |
#else |
| 75 |
#define SUNSPECIFIC |
| 76 |
#endif |
| 77 |
|
| 78 |
#ifndef SUNKEYS |
| 79 |
XTERM*sunFunctionKeys: false |
| 80 |
#define SUNKEYS_SPECIFIC \ |
| 81 |
~@Num_Lock<Key>KP_Equal: string(0x1B)string("[211z")\n \ |
| 82 |
~@Num_Lock<Key>KP_Divide: string(0x1B)string("[212z")\n \ |
| 83 |
~@Num_Lock<Key>KP_Multiply: string(0x1B)string("[213z")\n \ |
| 84 |
~@Num_Lock<Key>KP_5: string(0x1B)string("[218z")\n |
| 85 |
#define SUNKEYS_KP_SPECIFIC \ |
| 86 |
<Key>Prior: string(0x1B)string("[5~")\n \ |
| 87 |
<Key>Next: string(0x1B)string("[6~")\n \ |
| 88 |
<Key>Insert: string(0x1B)string("[2~")\n \ |
| 89 |
<Key>Find: string(0x1B)string("[1~")\n |
| 90 |
#else |
| 91 |
XTERM*sunFunctionKeys: true |
| 92 |
#define SUNKEYS_SPECIFIC |
| 93 |
#define SUNKEYS_KP_SPECIFIC \ |
| 94 |
<Key>Prior: string(0x1B)string("[216z")\n \ |
| 95 |
<Key>Next: string(0x1B)string("[222z")\n \ |
| 96 |
<Key>Insert: string(0x1B)string("[2~")\n |
| 97 |
#endif |
| 98 |
|
| 99 |
XTERM.VT100.Translations: #override \ |
| 100 |
<Key>SunF36: string(0x1B)string("[234z")\n \ |
| 101 |
<Key>SunF37: string(0x1B)string("[235z")\n \ |
| 102 |
SUNSPECIFIC \ |
| 103 |
SUNKEYS_SPECIFIC \ |
| 104 |
~@Num_Lock<Key>KP_Decimal: string(0x1B)string("[249z")\n \ |
| 105 |
~@Num_Lock<Key>KP_Enter: string(0x1B)string("[250z")\n \ |
| 106 |
~@Num_Lock<Key>KP_Add: string(0x1B)string("[253z")\n \ |
| 107 |
~@Num_Lock<Key>KP_Subtract: string(0x1B)string("[254z")\n \ |
| 108 |
~@Num_Lock<Key>KP_Insert: string(0x1B)string("[2~")\n \ |
| 109 |
@Num_Lock<Key>KP_0: string(0)\n \ |
| 110 |
@Num_Lock<Key>KP_1: string(1)\n \ |
| 111 |
@Num_Lock<Key>KP_2: string(2)\n \ |
| 112 |
@Num_Lock<Key>KP_3: string(3)\n \ |
| 113 |
@Num_Lock<Key>KP_4: string(4)\n \ |
| 114 |
@Num_Lock<Key>KP_5: string(5)\n \ |
| 115 |
@Num_Lock<Key>KP_6: string(6)\n \ |
| 116 |
@Num_Lock<Key>KP_7: string(7)\n \ |
| 117 |
@Num_Lock<Key>KP_8: string(8)\n \ |
| 118 |
@Num_Lock<Key>KP_9: string(9)\n \ |
| 119 |
@Num_Lock<Key>KP_Decimal: string(.)\n \ |
| 120 |
@Num_Lock<Key>KP_Enter: string(0x0D)\n \ |
| 121 |
@Num_Lock<Key>KP_Add: string(+)\n \ |
| 122 |
@Num_Lock<Key>KP_Subtract: string(-)\n \ |
| 123 |
@Num_Lock<Key>KP_Multiply: string(*)\n \ |
| 124 |
@Num_Lock<Key>KP_Divide: string(/)\n \ |
| 125 |
@Num_Lock<Key>KP_Equal: string(=)\n \ |
| 126 |
<Key>Help: string(0x1B)string("[202z")\n \ |
| 127 |
<Key>Left: string(0x1B)string("[D")\n \ |
| 128 |
<Key>Right: string(0x1B)string("[C")\n \ |
| 129 |
<Key>Up: string(0x1B)string("[A")\n \ |
| 130 |
<Key>Down: string(0x1B)string("[B")\n \ |
| 131 |
<Key>Home: string(0x1B)string("[214z")\n \ |
| 132 |
<Key>End: string(0x1B)string("[220z")\n \ |
| 133 |
SUNKEYS_KP_SPECIFIC \ |
| 134 |
MOUSE_SPECIFIC |