| 1 |
# The following bindings should work with most keyboards when used |
| 2 |
# with the 'xterm' terminal emulator. There are two sets of bindings of |
| 3 |
# function keys within 'xterm' that are commonly used on Suns, one emulating |
| 4 |
# the customary Sun bindings and the other being more vt220-like. The |
| 5 |
# following binding will work with either of them. Note: in the preceding, |
| 6 |
# "binding" means the characters sent by xterm to the program in response |
| 7 |
# to keystrokes. |
| 8 |
# |
| 9 |
# We try to accomodate the mutations of xterm in XFree86 and its successors. |
| 10 |
# F1-F3, Delete, Home, End, and the 5-key in the keyapad generate novel sequences. |
| 11 |
|
| 12 |
# Xterm Mouse Bindings |
| 13 |
# |
| 14 |
# If its program enables the mode, xterm will send the client character |
| 15 |
# sequences signifying certain mouse events. JOVE will enable this mode |
| 16 |
# while it is running if the xt-mouse variable is on. |
| 17 |
|
| 18 |
set xt-mouse on |
| 19 |
|
| 20 |
# JOVE decodes the resulting character sequences using its normal |
| 21 |
# key binding techiques. These bindings invoke certain commands designed |
| 22 |
# to process mouse events. Here we have two set of bindings: one |
| 23 |
# makes mouse actions behave analogously to those in xterm; the other |
| 24 |
# is more like OpenLook. One should be suppressed via commenting. |
| 25 |
# |
| 26 |
# Bindings to give other "looks and feels" are possible, except for |
| 27 |
# operations marked 'button 1 ONLY' below. Those operations involving |
| 28 |
# use of CTRL require the special translation table contained in the |
| 29 |
# file 'XTermresource'. |
| 30 |
|
| 31 |
# Xterm "Look and Feel" Bindings: |
| 32 |
# |
| 33 |
# button 1: |
| 34 |
# down with no modifiers: |
| 35 |
# xt-mouse-point [set point to mouse location] |
| 36 |
# down with CTRL held: |
| 37 |
# xt-mouse-mark [set point and mark to mouse location] |
| 38 |
# button 2: |
| 39 |
# down with no modifiers: |
| 40 |
# xt-mouse-point-yank [yank at mouse location] |
| 41 |
# [weaker but more xterm-like binding: xt-mouse-yank for yank at point] |
| 42 |
# down with CTRL held: |
| 43 |
# xt-mouse-cut-point-yank [delete region and yank at mouse location] |
| 44 |
# button 3: |
| 45 |
# down with no modifiers: |
| 46 |
# xt-mouse-extend [extend copied region and re-copy] |
| 47 |
# down with CTRL held: |
| 48 |
# xt-mouse-null |
| 49 |
# button up: |
| 50 |
# up after drag: [button 1 ONLY] |
| 51 |
# xt-mouse-mark-drag-point-copy [set region and copy] |
| 52 |
# other button up: |
| 53 |
# xt-mouse-null |
| 54 |
|
| 55 |
# button 1 down [note that the next line has a SPace at the end] |
| 56 |
bind-to-key xt-mouse-point ^[[M |
| 57 |
bind-to-key xt-mouse-mark ^[[M0 |
| 58 |
|
| 59 |
# button 2 down |
| 60 |
# less powerful but more xterm-like: bind-to-key xt-mouse-yank ^[[M! |
| 61 |
bind-to-key xt-mouse-point-yank ^[[M! |
| 62 |
bind-to-key xt-mouse-cut-point-yank ^[[M1 |
| 63 |
|
| 64 |
# button 3 down |
| 65 |
bind-to-key xt-mouse-extend ^[[M" |
| 66 |
bind-to-key xt-mouse-null ^[[M2 |
| 67 |
|
| 68 |
# button 1 up after drag and/or multiclick |
| 69 |
bind-to-key xt-mouse-mark-drag-point-copy ^[[T |
| 70 |
bind-to-key xt-mouse-mark-drag-point-copy ^[[t |
| 71 |
|
| 72 |
# other button releases |
| 73 |
bind-to-key xt-mouse-null ^[[M# |
| 74 |
bind-to-key xt-mouse-null ^[[M3 |
| 75 |
|
| 76 |
# End of xterm "look and feel" bindings. |
| 77 |
|
| 78 |
|
| 79 |
## OpenLook "Look and Feel" Bindings: |
| 80 |
## |
| 81 |
## The differences are in buttons 2 and 3. |
| 82 |
## |
| 83 |
## button 1: |
| 84 |
## down with no modifiers: |
| 85 |
## xt-mouse-point [set point to mouse location] |
| 86 |
## down with CTRL held: |
| 87 |
## xt-mouse-mark [set point and mark to mouse location] |
| 88 |
## button 2: |
| 89 |
## down with no modifiers: |
| 90 |
## xt-mouse-extend [extend copied region and re-copy] |
| 91 |
## down with CTRL held: |
| 92 |
## xt-mouse-point-yank [yank at mouse location] |
| 93 |
## button 3: |
| 94 |
## down with no modifiers: |
| 95 |
## xt-mouse-null |
| 96 |
## down with CTRL held: |
| 97 |
## xt-mouse-cut-point-yank [delete region and yank at mouse location] |
| 98 |
## button up: |
| 99 |
## up after drag: [button 1 ONLY] |
| 100 |
## xt-mouse-mark-drag-point-copy [set region and copy] |
| 101 |
## other button up: |
| 102 |
## xt-mouse-null |
| 103 |
# |
| 104 |
## button 1 down [note that the next line has a SPace at the end] |
| 105 |
#bind-to-key xt-mouse-point ^[[M |
| 106 |
#bind-to-key xt-mouse-mark ^[[M0 |
| 107 |
# |
| 108 |
## button 2 down |
| 109 |
#bind-to-key xt-mouse-extend ^[[M! |
| 110 |
#bind-to-key xt-mouse-point-yank ^[[M1 |
| 111 |
# |
| 112 |
## button 3 down |
| 113 |
#bind-to-key xt-mouse-null ^[[M" |
| 114 |
#bind-to-key xt-mouse-cut-point-yank ^[[M2 |
| 115 |
# |
| 116 |
## button 1 up after drag and/or multiclick |
| 117 |
#bind-to-key xt-mouse-mark-drag-point-copy ^[[T |
| 118 |
#bind-to-key xt-mouse-mark-drag-point-copy ^[[t |
| 119 |
# |
| 120 |
## other button releases |
| 121 |
#bind-to-key xt-mouse-null ^[[M# |
| 122 |
#bind-to-key xt-mouse-null ^[[M3 |
| 123 |
# |
| 124 |
## End of OpenLook "look and feel" bindings. |
| 125 |
|
| 126 |
|
| 127 |
# define macro to display TERMinal-specific keychart file |
| 128 |
define-macro keychart ^[xpushlibd^M^U^[xshell-command-with-typeout cat keychart.$TERM^M^[xpopd^M |
| 129 |
|
| 130 |
# See the file jove.rc.sun(-cmd) for further details of this binding, and |
| 131 |
# for reasons why it is as it is. |
| 132 |
|
| 133 |
# Arrow keys |
| 134 |
bind-to-key backward-character ^[[D |
| 135 |
bind-to-key previous-line ^[[A |
| 136 |
bind-to-key next-line ^[[B |
| 137 |
bind-to-key forward-character ^[[C |
| 138 |
bind-to-key backward-character ^[OD |
| 139 |
bind-to-key previous-line ^[OA |
| 140 |
bind-to-key next-line ^[OB |
| 141 |
bind-to-key forward-character ^[OC |
| 142 |
|
| 143 |
# L keys |
| 144 |
bind-to-key over-write-mode ^[[192z |
| 145 |
bind-to-key auto-fill-mode ^[[193z |
| 146 |
bind-to-key set-mark ^[[194z |
| 147 |
bind-to-key set-mark ^[[25~ |
| 148 |
bind-to-key exchange-point-and-mark ^[[195z |
| 149 |
bind-to-key exchange-point-and-mark ^[[26~ |
| 150 |
bind-to-key copy-region ^[[197z |
| 151 |
bind-to-key copy-region ^[[29~ |
| 152 |
bind-to-key yank ^[[199z |
| 153 |
bind-to-key yank ^[[32~ |
| 154 |
bind-to-key search-forward ^[[200z |
| 155 |
bind-to-key search-forward ^[[33~ |
| 156 |
bind-to-key search-forward ^[[1~ |
| 157 |
bind-to-key search-reverse ^[^[[200z |
| 158 |
bind-to-key search-reverse ^[^[[33~ |
| 159 |
bind-to-key search-reverse ^[^[[1~ |
| 160 |
bind-to-key kill-region ^[[201z |
| 161 |
bind-to-key kill-region ^[[34~ |
| 162 |
|
| 163 |
# Help key |
| 164 |
bind-macro-to-key keychart ^[[202z |
| 165 |
|
| 166 |
# F keys |
| 167 |
bind-to-key execute-named-command ^[[224z |
| 168 |
bind-to-key execute-named-command ^[[11~ |
| 169 |
bind-to-key execute-named-command ^[OP |
| 170 |
bind-to-key split-current-window ^[[225z |
| 171 |
bind-to-key split-current-window ^[[12~ |
| 172 |
bind-to-key split-current-window ^[OQ |
| 173 |
bind-to-key next-window ^[[226z |
| 174 |
bind-to-key next-window ^[[13~ |
| 175 |
bind-to-key next-window ^[OR |
| 176 |
bind-to-key delete-other-window ^[[227z |
| 177 |
bind-to-key delete-other-window ^[[14~ |
| 178 |
bind-to-key delete-other-window ^[OS |
| 179 |
bind-to-key delete-current-window ^[[228z |
| 180 |
bind-to-key delete-current-window ^[[15~ |
| 181 |
bind-to-key grow-window ^[[229z |
| 182 |
bind-to-key grow-window ^[[17~ |
| 183 |
bind-to-key spell-buffer ^[[230z |
| 184 |
bind-to-key spell-buffer ^[[18~ |
| 185 |
bind-to-key fill-comment ^[[231z |
| 186 |
bind-to-key fill-comment ^[[19~ |
| 187 |
bind-to-key fill-paragraph ^[[232z |
| 188 |
bind-to-key fill-paragraph ^[[20~ |
| 189 |
bind-to-key list-buffers ^[[233z |
| 190 |
bind-to-key list-buffers ^[[21~ |
| 191 |
bind-to-key select-buffer ^[[234z |
| 192 |
bind-to-key select-buffer ^[[23~ |
| 193 |
bind-to-key find-file ^[[235z |
| 194 |
bind-to-key find-file ^[[24~ |
| 195 |
|
| 196 |
# On many keyboards the Backspace key is near Delete and, in the |
| 197 |
# default Jove bindings these both do delete-previous-character. They would |
| 198 |
# make a fine pair with one to delete forward and one to delete backward. |
| 199 |
# For historical reasons, we leave them both as delete backward, but |
| 200 |
# recommend that the adventurous (or IBM PC acculturated) enable these. |
| 201 |
# bind-to-key delete-next-character ^? |
| 202 |
# bind-to-key kill-next-word ^[^? |
| 203 |
bind-to-key delete-previous-character ^[[3~ |
| 204 |
|
| 205 |
# R keys (these are all associated with cursor movement or scrolling) |
| 206 |
bind-to-key unbound ^[[208z |
| 207 |
bind-to-key beginning-of-line ^[[209z |
| 208 |
bind-to-key beginning-of-file ^[OH |
| 209 |
bind-to-key end-of-line ^[[210z |
| 210 |
bind-to-key unbound ^[[211z |
| 211 |
bind-to-key backward-word ^[[212z |
| 212 |
bind-to-key forward-word ^[[213z |
| 213 |
bind-to-key beginning-of-file ^[[214z |
| 214 |
bind-to-key beginning-of-file ^[[41~ |
| 215 |
bind-to-key previous-page ^[[216z |
| 216 |
bind-to-key previous-page ^[[5~ |
| 217 |
# This moves the cursor to the start of the next line. |
| 218 |
define-macro newline-and-beginning ^A^N |
| 219 |
bind-macro-to-key newline-and-beginning ^[[218z |
| 220 |
bind-macro-to-key newline-and-beginning ^[OE |
| 221 |
bind-to-key end-of-file ^[[220z |
| 222 |
bind-to-key end-of-file ^[OF |
| 223 |
bind-to-key next-page ^[[222z |
| 224 |
bind-to-key next-page ^[[6~ |
| 225 |
|
| 226 |
# KP_0 (engraved "Ins") |
| 227 |
bind-to-key newline-and-backup ^[[2~ |
| 228 |
# KP_Point (engraved "Del") |
| 229 |
bind-macro-to-key kill-line ^[[249z |
| 230 |
# KP_Enter |
| 231 |
bind-to-key shell ^[[250z |
| 232 |
# KP_Add |
| 233 |
bind-to-key scroll-up ^[[253z |
| 234 |
# KP_Subtract |
| 235 |
bind-to-key scroll-down ^[[254z |
| 236 |
|
| 237 |
set scroll-bar on |