author | Claus Gittinger <cg@exept.de> |
Wed, 18 Jan 2006 17:44:02 +0100 | |
changeset 684 | 8bb31324d62b |
parent 681 | 26d33a18f12e |
child 690 | 4e7825c093ba |
permissions | -rw-r--r-- |
41 | 1 |
"* |
609 | 2 |
* Encoding: iso8859-1 |
3 |
* |
|
41 | 4 |
* $Header$ |
5 |
* |
|
399 | 6 |
* MIMEType: application/x-smalltalk-source |
7 |
* |
|
209 | 8 |
* ST/X startup configuration file: |
9 |
* |
|
41 | 10 |
* sample keyboard.rc - file |
11 |
* |
|
12 |
* this file defines some keyboard macros and adds mappings for |
|
54 | 13 |
* common function keys. These definitions used to be in 'private.rc', |
41 | 14 |
* but have been extracted into this separate file to allow easier |
15 |
* sharing of rc files (users having different private files, but want |
|
54 | 16 |
* to use the same keyboard mappings / keyboard macros) |
41 | 17 |
* |
54 | 18 |
* a copy of this file can reside in $home/.smalltalk/keyboard.rc or |
19 |
* in the current directory. |
|
20 |
* |
|
21 |
* these are my personal preferrences which may not be |
|
402 | 22 |
* correct for your environment. |
23 |
* |
|
609 | 24 |
* WARNING: |
402 | 25 |
* please keep the expressions below free from manipulating |
26 |
* global state - all that should be done here is to set up the current |
|
27 |
* screens keyboard map. |
|
28 |
* Reason: in multihead applications, this will be consulted for each |
|
29 |
* new display screen. |
|
41 | 30 |
*" |
31 |
||
86 | 32 |
|macros| |
41 | 33 |
|
34 |
"/ |
|
35 |
"/ define some keyboard macros as virtual function-keys: |
|
460 | 36 |
"/ ReplaceSelectionByUnixCommandsOutput: paste the output of a selected unix command .. |
37 |
"/ ToggleTabs: toggle between 4 and 8 col tab setting |
|
38 |
"/ IndentBy4: indents selection-line by 4 |
|
39 |
"/ UndentBy4: undents selection-line by 4 |
|
40 |
"/ IndentBy1: indents selection-line by 1 |
|
41 |
"/ UndentBy1: undents selection-line by 1 |
|
42 |
"/ ConvertSelectionToLowercase: to-lowercase |
|
43 |
"/ ConvertSelectionToUppercase: to-uppercase |
|
41 | 44 |
"/ |
403 | 45 |
"/ these virtual keys are mapped below to some real keys: |
46 |
"/ F9: undent by 4 |
|
47 |
"/ F10: indent by 4 |
|
48 |
"/ F11: undent by 1 |
|
49 |
"/ F12: indent by 1 |
|
86 | 50 |
|
374 | 51 |
macros := UserPreferences current functionKeySequences. |
41 | 52 |
|
86 | 53 |
"/ |
54 |
"/ macro to replace a text selection by unix commands output |
|
55 |
"/ |
|
460 | 56 |
macros at:#ReplaceSelectionByUnixCommandsOutput put:' |
459 | 57 |
"replace selection by corresponding |
288
ffd914a69270
better indent/undent behavior (delayed redraw)
Claus Gittinger <cg@exept.de>
parents:
255
diff
changeset
|
58 |
unix commands output" |
41 | 59 |
|
288
ffd914a69270
better indent/undent behavior (delayed redraw)
Claus Gittinger <cg@exept.de>
parents:
255
diff
changeset
|
60 |
|sel| |
41 | 61 |
|
288
ffd914a69270
better indent/undent behavior (delayed redraw)
Claus Gittinger <cg@exept.de>
parents:
255
diff
changeset
|
62 |
sel := self selection. |
ffd914a69270
better indent/undent behavior (delayed redraw)
Claus Gittinger <cg@exept.de>
parents:
255
diff
changeset
|
63 |
sel notNil ifTrue:[ |
ffd914a69270
better indent/undent behavior (delayed redraw)
Claus Gittinger <cg@exept.de>
parents:
255
diff
changeset
|
64 |
self replace: |
ffd914a69270
better indent/undent behavior (delayed redraw)
Claus Gittinger <cg@exept.de>
parents:
255
diff
changeset
|
65 |
(PipeStream readingFrom:(sel asString)) |
ffd914a69270
better indent/undent behavior (delayed redraw)
Claus Gittinger <cg@exept.de>
parents:
255
diff
changeset
|
66 |
contents asString |
634 | 67 |
] |
68 |
'. |
|
41 | 69 |
|
86 | 70 |
"/ |
487 | 71 |
"/ macro to paste the text generated by a block |
72 |
"/ |
|
73 |
"/macros at:#PasteBlockEvaluationsOutput put:' |
|
74 |
"/ "replace selection by blocks output" |
|
75 |
"/ |
|
76 |
"/ |sel s block| |
|
77 |
"/ |
|
78 |
"/ sel := self selectionAsString. |
|
79 |
"/ sel notNil ifTrue:[ |
|
80 |
"/ block := Compiler evaluate:sel asString string. |
|
81 |
"/ s := '''' writeStream. |
|
82 |
"/ block value:s. |
|
83 |
"/ self paste:s contents asString |
|
634 | 84 |
"/ ] |
85 |
"/'. |
|
487 | 86 |
|
87 |
"/ |
|
41 | 88 |
"/ macro to toggle tabs |
86 | 89 |
"/ |
460 | 90 |
macros at:#ToggleTabs put:' |
609 | 91 |
"toggle between 4-col |
288
ffd914a69270
better indent/undent behavior (delayed redraw)
Claus Gittinger <cg@exept.de>
parents:
255
diff
changeset
|
92 |
and 8-col tabs" |
41 | 93 |
|
288
ffd914a69270
better indent/undent behavior (delayed redraw)
Claus Gittinger <cg@exept.de>
parents:
255
diff
changeset
|
94 |
(tabPositions == self class tab4Positions) |
ffd914a69270
better indent/undent behavior (delayed redraw)
Claus Gittinger <cg@exept.de>
parents:
255
diff
changeset
|
95 |
ifTrue:[self setTab8] |
634 | 96 |
ifFalse:[self setTab4] |
97 |
'. |
|
41 | 98 |
|
86 | 99 |
"/ |
41 | 100 |
"/ macro to indent by 4 |
86 | 101 |
"/ |
460 | 102 |
macros at:#IndentBy4 put:' |
609 | 103 |
"indent selected line-range |
288
ffd914a69270
better indent/undent behavior (delayed redraw)
Claus Gittinger <cg@exept.de>
parents:
255
diff
changeset
|
104 |
by 4 spaces (i.e. to the right)" |
41 | 105 |
|
370
9aeb341c2dac
if no selection, indent/undent the cursorLine
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
106 |
|line1 line2| |
9aeb341c2dac
if no selection, indent/undent the cursorLine
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
107 |
|
9aeb341c2dac
if no selection, indent/undent the cursorLine
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
108 |
line1 := self selectionStartLine. |
9aeb341c2dac
if no selection, indent/undent the cursorLine
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
109 |
line2 := self selectionEndLine. |
9aeb341c2dac
if no selection, indent/undent the cursorLine
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
110 |
line1 isNil ifTrue:[ |
9aeb341c2dac
if no selection, indent/undent the cursorLine
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
111 |
line1 := self perform:#cursorLine ifNotUnderstood:nil. |
9aeb341c2dac
if no selection, indent/undent the cursorLine
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
112 |
line1 notNil ifTrue:[ |
9aeb341c2dac
if no selection, indent/undent the cursorLine
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
113 |
line2 := line1+1 |
9aeb341c2dac
if no selection, indent/undent the cursorLine
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
114 |
] |
9aeb341c2dac
if no selection, indent/undent the cursorLine
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
115 |
]. |
609 | 116 |
line1 notNil ifTrue:[ |
440
d0d6753a8f3f
speedup indent/undent operation
Claus Gittinger <cg@exept.de>
parents:
438
diff
changeset
|
117 |
self withExecuteCursorDo:[ |
d0d6753a8f3f
speedup indent/undent operation
Claus Gittinger <cg@exept.de>
parents:
438
diff
changeset
|
118 |
line1 to:line2-1 do:[:lineNr | |
d0d6753a8f3f
speedup indent/undent operation
Claus Gittinger <cg@exept.de>
parents:
438
diff
changeset
|
119 |
|line| |
41 | 120 |
|
440
d0d6753a8f3f
speedup indent/undent operation
Claus Gittinger <cg@exept.de>
parents:
438
diff
changeset
|
121 |
line := self listAt:lineNr. |
d0d6753a8f3f
speedup indent/undent operation
Claus Gittinger <cg@exept.de>
parents:
438
diff
changeset
|
122 |
line notNil ifTrue:[ |
d0d6753a8f3f
speedup indent/undent operation
Claus Gittinger <cg@exept.de>
parents:
438
diff
changeset
|
123 |
line notEmpty ifTrue:[ |
d0d6753a8f3f
speedup indent/undent operation
Claus Gittinger <cg@exept.de>
parents:
438
diff
changeset
|
124 |
line := '' '' , line. |
642 | 125 |
self withoutRedrawAt:lineNr put:line. |
440
d0d6753a8f3f
speedup indent/undent operation
Claus Gittinger <cg@exept.de>
parents:
438
diff
changeset
|
126 |
] |
41 | 127 |
] |
440
d0d6753a8f3f
speedup indent/undent operation
Claus Gittinger <cg@exept.de>
parents:
438
diff
changeset
|
128 |
]. |
d0d6753a8f3f
speedup indent/undent operation
Claus Gittinger <cg@exept.de>
parents:
438
diff
changeset
|
129 |
self textChanged. |
d0d6753a8f3f
speedup indent/undent operation
Claus Gittinger <cg@exept.de>
parents:
438
diff
changeset
|
130 |
line1 to:line2-1 do:[:lineNr | |
d0d6753a8f3f
speedup indent/undent operation
Claus Gittinger <cg@exept.de>
parents:
438
diff
changeset
|
131 |
self invalidateLine:lineNr. |
d0d6753a8f3f
speedup indent/undent operation
Claus Gittinger <cg@exept.de>
parents:
438
diff
changeset
|
132 |
]. |
288
ffd914a69270
better indent/undent behavior (delayed redraw)
Claus Gittinger <cg@exept.de>
parents:
255
diff
changeset
|
133 |
]. |
ffd914a69270
better indent/undent behavior (delayed redraw)
Claus Gittinger <cg@exept.de>
parents:
255
diff
changeset
|
134 |
] |
634 | 135 |
'. |
86 | 136 |
|
137 |
"/ |
|
41 | 138 |
"/ macro to undent by 4 |
86 | 139 |
"/ |
460 | 140 |
macros at:#UndentBy4 put:' |
609 | 141 |
"undent selected line-range |
288
ffd914a69270
better indent/undent behavior (delayed redraw)
Claus Gittinger <cg@exept.de>
parents:
255
diff
changeset
|
142 |
by 4 spaces (i.e. to the left)" |
41 | 143 |
|
370
9aeb341c2dac
if no selection, indent/undent the cursorLine
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
144 |
|line1 line2| |
9aeb341c2dac
if no selection, indent/undent the cursorLine
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
145 |
|
9aeb341c2dac
if no selection, indent/undent the cursorLine
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
146 |
line1 := self selectionStartLine. |
9aeb341c2dac
if no selection, indent/undent the cursorLine
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
147 |
line2 := self selectionEndLine. |
9aeb341c2dac
if no selection, indent/undent the cursorLine
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
148 |
line1 isNil ifTrue:[ |
9aeb341c2dac
if no selection, indent/undent the cursorLine
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
149 |
line1 := self perform:#cursorLine ifNotUnderstood:nil. |
9aeb341c2dac
if no selection, indent/undent the cursorLine
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
150 |
line1 notNil ifTrue:[ |
9aeb341c2dac
if no selection, indent/undent the cursorLine
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
151 |
line2 := line1+1 |
9aeb341c2dac
if no selection, indent/undent the cursorLine
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
152 |
] |
9aeb341c2dac
if no selection, indent/undent the cursorLine
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
153 |
]. |
609 | 154 |
line1 notNil ifTrue:[ |
440
d0d6753a8f3f
speedup indent/undent operation
Claus Gittinger <cg@exept.de>
parents:
438
diff
changeset
|
155 |
self withExecuteCursorDo:[ |
d0d6753a8f3f
speedup indent/undent operation
Claus Gittinger <cg@exept.de>
parents:
438
diff
changeset
|
156 |
line1 to:line2-1 do:[:lineNr | |
d0d6753a8f3f
speedup indent/undent operation
Claus Gittinger <cg@exept.de>
parents:
438
diff
changeset
|
157 |
|line| |
41 | 158 |
|
440
d0d6753a8f3f
speedup indent/undent operation
Claus Gittinger <cg@exept.de>
parents:
438
diff
changeset
|
159 |
line := self listAt:lineNr. |
d0d6753a8f3f
speedup indent/undent operation
Claus Gittinger <cg@exept.de>
parents:
438
diff
changeset
|
160 |
line notNil ifTrue:[ |
d0d6753a8f3f
speedup indent/undent operation
Claus Gittinger <cg@exept.de>
parents:
438
diff
changeset
|
161 |
line notEmpty ifTrue:[ |
d0d6753a8f3f
speedup indent/undent operation
Claus Gittinger <cg@exept.de>
parents:
438
diff
changeset
|
162 |
(line startsWith:'' '') ifTrue:[ |
d0d6753a8f3f
speedup indent/undent operation
Claus Gittinger <cg@exept.de>
parents:
438
diff
changeset
|
163 |
line := line copyFrom:5. |
642 | 164 |
self withoutRedrawAt:lineNr put:line. |
440
d0d6753a8f3f
speedup indent/undent operation
Claus Gittinger <cg@exept.de>
parents:
438
diff
changeset
|
165 |
] |
41 | 166 |
] |
167 |
] |
|
440
d0d6753a8f3f
speedup indent/undent operation
Claus Gittinger <cg@exept.de>
parents:
438
diff
changeset
|
168 |
]. |
d0d6753a8f3f
speedup indent/undent operation
Claus Gittinger <cg@exept.de>
parents:
438
diff
changeset
|
169 |
self textChanged. |
d0d6753a8f3f
speedup indent/undent operation
Claus Gittinger <cg@exept.de>
parents:
438
diff
changeset
|
170 |
line1 to:line2-1 do:[:lineNr | |
d0d6753a8f3f
speedup indent/undent operation
Claus Gittinger <cg@exept.de>
parents:
438
diff
changeset
|
171 |
self invalidateLine:lineNr. |
d0d6753a8f3f
speedup indent/undent operation
Claus Gittinger <cg@exept.de>
parents:
438
diff
changeset
|
172 |
]. |
288
ffd914a69270
better indent/undent behavior (delayed redraw)
Claus Gittinger <cg@exept.de>
parents:
255
diff
changeset
|
173 |
]. |
ffd914a69270
better indent/undent behavior (delayed redraw)
Claus Gittinger <cg@exept.de>
parents:
255
diff
changeset
|
174 |
] |
634 | 175 |
'. |
176 |
||
292 | 177 |
"/ |
178 |
"/ macro to indent by 1 |
|
179 |
"/ |
|
460 | 180 |
macros at:#IndentBy1 put:' |
609 | 181 |
"indent selected line-range |
292 | 182 |
by 1 space (i.e. to the right)" |
183 |
||
370
9aeb341c2dac
if no selection, indent/undent the cursorLine
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
184 |
|line1 line2| |
9aeb341c2dac
if no selection, indent/undent the cursorLine
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
185 |
|
9aeb341c2dac
if no selection, indent/undent the cursorLine
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
186 |
line1 := self selectionStartLine. |
9aeb341c2dac
if no selection, indent/undent the cursorLine
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
187 |
line2 := self selectionEndLine. |
9aeb341c2dac
if no selection, indent/undent the cursorLine
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
188 |
line1 isNil ifTrue:[ |
9aeb341c2dac
if no selection, indent/undent the cursorLine
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
189 |
line1 := self perform:#cursorLine ifNotUnderstood:nil. |
9aeb341c2dac
if no selection, indent/undent the cursorLine
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
190 |
line1 notNil ifTrue:[ |
9aeb341c2dac
if no selection, indent/undent the cursorLine
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
191 |
line2 := line1+1 |
9aeb341c2dac
if no selection, indent/undent the cursorLine
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
192 |
] |
9aeb341c2dac
if no selection, indent/undent the cursorLine
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
193 |
]. |
609 | 194 |
line1 notNil ifTrue:[ |
642 | 195 |
self withExecuteCursorDo:[ |
196 |
line1 to:line2-1 do:[:lineNr | |
|
197 |
|line| |
|
292 | 198 |
|
642 | 199 |
line := self listAt:lineNr. |
200 |
line notNil ifTrue:[ |
|
201 |
line notEmpty ifTrue:[ |
|
202 |
line := '' '' , line. |
|
203 |
self withoutRedrawAt:lineNr put:line. |
|
204 |
] |
|
292 | 205 |
] |
642 | 206 |
]. |
207 |
self textChanged. |
|
208 |
line1 to:line2-1 do:[:lineNr | |
|
209 |
self invalidateLine:lineNr. |
|
210 |
]. |
|
211 |
] |
|
292 | 212 |
] |
634 | 213 |
'. |
292 | 214 |
|
215 |
"/ |
|
216 |
"/ macro to undent by 1 |
|
217 |
"/ |
|
460 | 218 |
macros at:#UndentBy1 put:' |
609 | 219 |
"undent selected line-range |
292 | 220 |
by 1 space (i.e. to the left)" |
221 |
||
370
9aeb341c2dac
if no selection, indent/undent the cursorLine
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
222 |
|line1 line2| |
9aeb341c2dac
if no selection, indent/undent the cursorLine
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
223 |
|
9aeb341c2dac
if no selection, indent/undent the cursorLine
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
224 |
line1 := self selectionStartLine. |
9aeb341c2dac
if no selection, indent/undent the cursorLine
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
225 |
line2 := self selectionEndLine. |
9aeb341c2dac
if no selection, indent/undent the cursorLine
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
226 |
line1 isNil ifTrue:[ |
9aeb341c2dac
if no selection, indent/undent the cursorLine
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
227 |
line1 := self perform:#cursorLine ifNotUnderstood:nil. |
9aeb341c2dac
if no selection, indent/undent the cursorLine
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
228 |
line1 notNil ifTrue:[ |
9aeb341c2dac
if no selection, indent/undent the cursorLine
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
229 |
line2 := line1+1 |
9aeb341c2dac
if no selection, indent/undent the cursorLine
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
230 |
] |
9aeb341c2dac
if no selection, indent/undent the cursorLine
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
231 |
]. |
609 | 232 |
line1 notNil ifTrue:[ |
642 | 233 |
self withExecuteCursorDo:[ |
234 |
line1 to:line2-1 do:[:lineNr | |
|
235 |
|line| |
|
292 | 236 |
|
642 | 237 |
line := self listAt:lineNr. |
238 |
line notNil ifTrue:[ |
|
239 |
line notEmpty ifTrue:[ |
|
240 |
(line startsWith:'' '') ifTrue:[ |
|
241 |
line := line copyFrom:2. |
|
242 |
self withoutRedrawAt:lineNr put:line. |
|
243 |
] |
|
292 | 244 |
] |
245 |
] |
|
642 | 246 |
]. |
247 |
self textChanged. |
|
248 |
line1 to:line2-1 do:[:lineNr | |
|
249 |
self invalidateLine:lineNr. |
|
250 |
]. |
|
292 | 251 |
]. |
252 |
] |
|
634 | 253 |
'. |
457 | 254 |
|
255 |
"/ |
|
256 |
"/ macro to convert selection to lowercase |
|
257 |
"/ |
|
460 | 258 |
macros at:#ConvertSelectionToLowercase put:' |
457 | 259 |
"to-lower selected text" |
260 |
||
261 |
|line1 line2| |
|
262 |
||
263 |
line1 := self selectionStartLine. |
|
264 |
line2 := self selectionEndLine. |
|
265 |
line1 isNil ifTrue:[ |
|
266 |
line1 := self perform:#cursorLine ifNotUnderstood:nil. |
|
267 |
line1 notNil ifTrue:[ |
|
268 |
line2 := line1 |
|
269 |
] |
|
270 |
]. |
|
609 | 271 |
line1 notNil ifTrue:[ |
457 | 272 |
line1 to:line2 do:[:lineNr | |
273 |
|line col1 col2| |
|
274 |
||
644 | 275 |
line := (self listAt:lineNr) copy. |
457 | 276 |
line size > 0 ifTrue:[ |
277 |
lineNr == line1 ifTrue:[ |
|
278 |
col1 := selectionStartCol. |
|
279 |
] ifFalse:[ |
|
280 |
col1 := 1. |
|
281 |
]. |
|
282 |
lineNr == line2 ifTrue:[ |
|
283 |
col2 := selectionEndCol. |
|
284 |
] ifFalse:[ |
|
285 |
col2 := (self listAt:lineNr) size. |
|
286 |
]. |
|
287 |
||
288 |
col1 to:col2 do:[:col | |
|
289 |
|ch| |
|
290 |
||
291 |
ch := line at:col. |
|
586 | 292 |
line at:col put:ch asLowercase. |
457 | 293 |
]. |
294 |
self withoutRedrawAt:lineNr put:line. |
|
295 |
self invalidateLine:lineNr. |
|
296 |
]. |
|
297 |
]. |
|
298 |
] |
|
634 | 299 |
'. |
457 | 300 |
|
548
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
301 |
"/ |
586 | 302 |
"/ macro to convert selection to uppercaseFirst words |
548
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
303 |
"/ |
586 | 304 |
macros at:#ConvertSelectionToUppercaseFirst put:' |
548
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
305 |
"to-lower selected text" |
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
306 |
|
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
307 |
|line1 line2| |
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
308 |
|
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
309 |
line1 := self selectionStartLine. |
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
310 |
line2 := self selectionEndLine. |
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
311 |
line1 isNil ifTrue:[ |
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
312 |
line1 := self perform:#cursorLine ifNotUnderstood:nil. |
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
313 |
line1 notNil ifTrue:[ |
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
314 |
line2 := line1 |
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
315 |
] |
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
316 |
]. |
609 | 317 |
line1 notNil ifTrue:[ |
548
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
318 |
line1 to:line2 do:[:lineNr | |
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
319 |
|line col1 col2 state| |
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
320 |
|
644 | 321 |
line := (self listAt:lineNr) copy. |
548
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
322 |
line size > 0 ifTrue:[ |
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
323 |
lineNr == line1 ifTrue:[ |
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
324 |
col1 := selectionStartCol. |
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
325 |
] ifFalse:[ |
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
326 |
col1 := 1. |
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
327 |
]. |
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
328 |
lineNr == line2 ifTrue:[ |
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
329 |
col2 := selectionEndCol. |
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
330 |
] ifFalse:[ |
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
331 |
col2 := (self listAt:lineNr) size. |
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
332 |
]. |
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
333 |
|
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
334 |
state := #first. |
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
335 |
col1 to:col2 do:[:col | |
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
336 |
|ch| |
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
337 |
|
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
338 |
ch := line at:col. |
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
339 |
ch isSeparator ifFalse:[ |
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
340 |
state == #first ifTrue:[ |
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
341 |
line at:col put:ch asUppercase. |
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
342 |
state := #skipRest |
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
343 |
] |
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
344 |
] ifTrue:[ |
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
345 |
state := #first |
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
346 |
] |
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
347 |
]. |
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
348 |
self withoutRedrawAt:lineNr put:line. |
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
349 |
self invalidateLine:lineNr. |
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
350 |
]. |
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
351 |
]. |
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
352 |
] |
634 | 353 |
'. |
548
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
354 |
|
460 | 355 |
macros at:#ConvertSelectionToUppercase put:' |
457 | 356 |
"to-lower selected text" |
357 |
||
358 |
|line1 line2| |
|
359 |
||
360 |
line1 := self selectionStartLine. |
|
361 |
line2 := self selectionEndLine. |
|
362 |
line1 isNil ifTrue:[ |
|
363 |
line1 := self perform:#cursorLine ifNotUnderstood:nil. |
|
364 |
line1 notNil ifTrue:[ |
|
365 |
line2 := line1 |
|
366 |
] |
|
367 |
]. |
|
609 | 368 |
line1 notNil ifTrue:[ |
457 | 369 |
line1 to:line2 do:[:lineNr | |
370 |
|line col1 col2| |
|
371 |
||
644 | 372 |
line := (self listAt:lineNr) copy. |
457 | 373 |
line size > 0 ifTrue:[ |
374 |
lineNr == line1 ifTrue:[ |
|
375 |
col1 := selectionStartCol. |
|
376 |
] ifFalse:[ |
|
377 |
col1 := 1. |
|
378 |
]. |
|
379 |
lineNr == line2 ifTrue:[ |
|
380 |
col2 := selectionEndCol. |
|
381 |
] ifFalse:[ |
|
382 |
col2 := (self listAt:lineNr) size. |
|
383 |
]. |
|
384 |
||
385 |
col1 to:col2 do:[:col | |
|
386 |
|ch| |
|
387 |
||
388 |
ch := line at:col. |
|
586 | 389 |
line at:col put:ch asUppercase. |
457 | 390 |
]. |
391 |
self withoutRedrawAt:lineNr put:line. |
|
392 |
self invalidateLine:lineNr. |
|
393 |
]. |
|
394 |
]. |
|
395 |
] |
|
634 | 396 |
'. |
457 | 397 |
|
86 | 398 |
! |
399 |
||
92 | 400 |
"* |
401 |
* key bindings common to all display types |
|
402 |
* use event monitor, to see what the Xserver sends us; |
|
403 |
* put display-specific stuff into a d_hostName.rc file. |
|
404 |
*" |
|
402 | 405 |
|map screen| |
86 | 406 |
|
402 | 407 |
screen := Screen current. |
408 |
map := screen keyboardMap. |
|
86 | 409 |
|
402 | 410 |
(screen serverVendor startsWith:'DECWINDOWS') ifTrue:[ |
252
5d4a68556e45
ESC & Compose keys on DEC keyboards
Claus Gittinger <cg@exept.de>
parents:
209
diff
changeset
|
411 |
"/ DEC has messed up the ESC key completely. |
5d4a68556e45
ESC & Compose keys on DEC keyboards
Claus Gittinger <cg@exept.de>
parents:
209
diff
changeset
|
412 |
"/ map ALT-` onto ESC for our convenience. |
5d4a68556e45
ESC & Compose keys on DEC keyboards
Claus Gittinger <cg@exept.de>
parents:
209
diff
changeset
|
413 |
"/ |
5d4a68556e45
ESC & Compose keys on DEC keyboards
Claus Gittinger <cg@exept.de>
parents:
209
diff
changeset
|
414 |
"/ also, the right compose key (comes in as 'AltMulti_key' or |
5d4a68556e45
ESC & Compose keys on DEC keyboards
Claus Gittinger <cg@exept.de>
parents:
209
diff
changeset
|
415 |
"/ 'CtrlMulti_key' depending on the keyboard) is mapped |
5d4a68556e45
ESC & Compose keys on DEC keyboards
Claus Gittinger <cg@exept.de>
parents:
209
diff
changeset
|
416 |
"/ to 'Compose'. |
5d4a68556e45
ESC & Compose keys on DEC keyboards
Claus Gittinger <cg@exept.de>
parents:
209
diff
changeset
|
417 |
map bindValue:#Escape to:#'Cmd`'. |
5d4a68556e45
ESC & Compose keys on DEC keyboards
Claus Gittinger <cg@exept.de>
parents:
209
diff
changeset
|
418 |
map bindValue:#Compose to:#'AltMulti_key'. "/ the right compose key |
5d4a68556e45
ESC & Compose keys on DEC keyboards
Claus Gittinger <cg@exept.de>
parents:
209
diff
changeset
|
419 |
|
5d4a68556e45
ESC & Compose keys on DEC keyboards
Claus Gittinger <cg@exept.de>
parents:
209
diff
changeset
|
420 |
map bindValue:#Return to:#'KP_Enter'. "/ the keypads return key |
609 | 421 |
]. |
252
5d4a68556e45
ESC & Compose keys on DEC keyboards
Claus Gittinger <cg@exept.de>
parents:
209
diff
changeset
|
422 |
|
609 | 423 |
"/ map bindValue:#'Hardcopy' to:#'Super_R'. |
424 |
map bindValue:#'Alt' to:#'Super_L'. |
|
425 |
map bindValue:#'Alt' to:#'Hyper_R'. |
|
299 | 426 |
|
92 | 427 |
map bindValue:#UserInterrupt to:#Ctrlc. "interrupt window process" |
290 | 428 |
map bindValue:#UserAbort to:#Ctrly. "abort window process, but no debugger" |
92 | 429 |
map bindValue:#FlushInput to:#CtrlX. "flush typeahead input" |
430 |
map bindValue:#DestroyView to:#CmdCtrlX. "to destroy dead views" |
|
431 |
map bindValue:#DestroyTopView to:#CmdCtrlx. "to destroy dead views" |
|
432 |
||
433 |
map bindValue:#DoIt to:#Cmdd. "i.e. Cmd-d / Alt-d (sometimes Meta-d)" |
|
434 |
map bindValue:#InspectIt to:#Cmdi. "evaluate & inspect result" |
|
435 |
map bindValue:#PrintIt to:#Cmdp. "evaluate and paste result" |
|
455
1bc57270b5d7
added Cmd-Shift-B as BrowseIt shortCut
Claus Gittinger <cg@exept.de>
parents:
442
diff
changeset
|
436 |
map bindValue:#BrowseIt to:#CmdB. |
496 | 437 |
map bindValue:#ImplementorsOfIt to:#CmdI. |
92 | 438 |
|
681 | 439 |
map bindValue:#ToggleInsertMode to:#Ctrli. |
440 |
||
92 | 441 |
map bindValue:#Copy to:#Cmdc. "copy selection to buffer" |
442 |
map bindValue:#Cut to:#Cmdx. "cut selection into buffer" |
|
443 |
map bindValue:#Paste to:#Cmdv. "paste buffer or external selection" |
|
619 | 444 |
map bindValue:#Paste to:#CmdV. "paste buffer or external selection" |
455
1bc57270b5d7
added Cmd-Shift-B as BrowseIt shortCut
Claus Gittinger <cg@exept.de>
parents:
442
diff
changeset
|
445 |
"/map bindValue:#Cut to:#CtrlDelete. "paste buffer or external selection" |
1bc57270b5d7
added Cmd-Shift-B as BrowseIt shortCut
Claus Gittinger <cg@exept.de>
parents:
442
diff
changeset
|
446 |
"/map bindValue:#Paste to:#CtrlInsert. "paste buffer or external selection" |
92 | 447 |
map bindValue:#Replace to:#Cmdr. "same as paste" |
448 |
map bindValue:#Find to:#Cmds. "open searchbox" |
|
449 |
map bindValue:#FindNext to:#Cmdf. "search fwd for last searchpattern or selection" |
|
450 |
map bindValue:#FindPrev to:#Cmdb. "search bwd for last searchpattern or selection" |
|
451 |
map bindValue:#SelectAll to:#CmdA. "that is Alt-shift-a" |
|
452 |
map bindValue:#GotoLine to:#Cmdg. |
|
453 |
map bindValue:#SelectWord to:#Cmdw. "select word under cursor" |
|
620 | 454 |
map bindValue:#Undo to:#Cmdu. |
92 | 455 |
|
456 |
map bindValue:#Accept to:#Cmda. |
|
457 |
map bindValue:#Explain to:#Cmde. |
|
458 |
map bindValue:#Explain to:#Cmdh. |
|
547 | 459 |
map bindValue:#Format to:#CmdF. "that is Alt-shift-F" |
554 | 460 |
"/ map bindValue:#Format to:#CtrlF. "that is Ctrl-shift-F" |
92 | 461 |
|
462 |
map bindValue:#DeleteLine to:#Ctrlx. |
|
463 |
||
464 |
map bindValue:#NextPage to:#Next. "typically labelled PageDown on keyboard" |
|
465 |
map bindValue:#PreviousPage to:#Prior. "typically labelled PageUp on keyboard" |
|
466 |
||
467 |
map bindValue:#PreviousPage to:#Ctrlb. "vi behavior" |
|
468 |
map bindValue:#NextPage to:#Ctrlf. "vi behavior" |
|
469 |
map bindValue:#HalfPageUp to:#Ctrlu. |
|
470 |
map bindValue:#HalfPageDown to:#Ctrld. |
|
471 |
||
442 | 472 |
"/ old setting: |
473 |
"/ map bindValue:#BeginOfText to:#Home. "some prefer to bind #BeginOfLine to #Home" |
|
474 |
"/ map bindValue:#EndOfText to:#End. "some prefer to bind #EndOfLine to #End" |
|
475 |
"/ |
|
476 |
"/ new setting: |
|
609 | 477 |
map bindValue:#BeginOfLine to:#Home. |
478 |
map bindValue:#EndOfLine to:#End. |
|
479 |
map bindValue:#BeginOfText to:#CtrlHome. |
|
480 |
map bindValue:#EndOfText to:#CtrlEnd. |
|
442 | 481 |
|
92 | 482 |
map bindValue:#BeginOfLine to:#Ctrla. |
483 |
map bindValue:#EndOfLine to:#Ctrle. |
|
484 |
map bindValue:#NextWord to:#Ctrlw. |
|
609 | 485 |
map bindValue:#NextWord to:#CtrlCursorRight. |
486 |
map bindValue:#PreviousWord to:#CtrlCursorLeft. |
|
92 | 487 |
|
609 | 488 |
map bindValue:#ScrollUp to:#CtrlCursorUp. |
489 |
map bindValue:#ScrollDown to:#CtrlCursorDown. |
|
92 | 490 |
|
491 |
map bindValue:#SearchMatchingParent to:#Ctrlm. |
|
492 |
map bindValue:#SelectMatchingParents to:#Cmdm. |
|
493 |
||
494 |
map bindValue:#SelectToEnd to:#CtrlE. "that is ctrl-shift-e" |
|
495 |
map bindValue:#SelectFromBeginning to:#CtrlA. "that is ctrl-shift-a" |
|
496 |
map bindValue:#ExpandSelectionByLine to:#Ctrll. "try multiple Ctrl-l's ..." |
|
497 |
||
498 |
"Notice: |
|
499 |
Cmd-CursorLeft/Right and Alt-CursorLeft/Right |
|
500 |
are also used by some winmdowmanagers (fvwm) |
|
501 |
if this is the case on your system, either |
|
502 |
change the following to use different keys, |
|
503 |
or change the windowmanagers configuration file |
|
504 |
(usr/lib/X11/xxxwm/*rc). |
|
505 |
The above is the reason that the following defines Ctrl-xxx |
|
506 |
as an alternative (mwm in the INDY also uses the alt-sequences) |
|
507 |
" |
|
508 |
map bindValue:#FocusNext to:#CmdCursorRight. "experimental" |
|
509 |
map bindValue:#FocusPrevious to:#CmdCursorLeft. "experimental" |
|
550 | 510 |
map bindValue:#FocusNext to:#CmdCursorDown. "experimental" |
511 |
map bindValue:#FocusPrevious to:#CmdCursorUp. "experimental" |
|
512 |
||
92 | 513 |
map bindValue:#FocusNext to:#AltCursorRight. "experimental" |
514 |
map bindValue:#FocusPrevious to:#AltCursorLeft. "experimental" |
|
255 | 515 |
map bindValue:#FocusNext to:#AltCursorDown. "experimental" |
516 |
map bindValue:#FocusPrevious to:#AltCursorUp. "experimental" |
|
92 | 517 |
"/ map bindValue:#FocusNext to:#CtrlCursorRight. "experimental" |
518 |
"/ map bindValue:#FocusPrevious to:#CtrlCursorLeft. "experimental" |
|
519 |
||
564 | 520 |
|
609 | 521 |
map bindValue:#NonInsertingTab to:#ShiftTab. |
522 |
"/ map bindValue:#BackTab to:#ShiftTab. |
|
523 |
map bindValue:#BackTab to:#CtrlTab. |
|
564 | 524 |
map bindValue:#NonInsertingTab to:#'ISO_Left_Tab'. |
525 |
"/ map bindValue:#ToggleTabs to:#CtrlTab. |
|
526 |
||
527 |
"/ map bindValue:#FocusNext to:#CtrlTab. "experimental" |
|
138 | 528 |
map bindValue:#FocusNext to:#CmdTab. "experimental" |
564 | 529 |
"/ map bindValue:#FocusPrevious to:#'ISO_Left_Tab'. |
530 |
map bindValue:#FocusPrevious to:#'CmdISO_Left_Tab'. |
|
415 | 531 |
"/ map bindValue:#Tab to:#'ISO_Left_Tab'. |
609 | 532 |
map bindValue:#Menu to:#Cmdz. |
92 | 533 |
|
122 | 534 |
"* |
535 |
* ISO LATIN 1 symbolic characters - map to iso8859 values |
|
536 |
* not all Xservers send those correctly. |
|
537 |
* As a fall back, dieresis mappings using Alt-key sequences are found at |
|
538 |
* the end. |
|
92 | 539 |
*" |
122 | 540 |
|
541 |
#( |
|
542 |
"/ dieresis characters |
|
543 |
||
544 |
Udiaeresis 16rDC |
|
545 |
Adiaeresis 16rC4 |
|
546 |
Odiaeresis 16rD6 |
|
547 |
udiaeresis 16rFC |
|
548 |
adiaeresis 16rE4 |
|
549 |
odiaeresis 16rF6 |
|
550 |
ydiaeresis 16rFF |
|
551 |
||
552 |
"/ grave |
|
553 |
||
554 |
Agrave 16rC0 |
|
555 |
Egrave 16rC8 |
|
556 |
Igrave 16rCC |
|
557 |
Ograve 16rCC |
|
558 |
Ugrave 16rD9 |
|
559 |
agrave 16rE0 |
|
560 |
egrave 16rE8 |
|
561 |
igrave 16rEC |
|
562 |
ograve 16rF2 |
|
563 |
ugrave 16rF9 |
|
564 |
||
565 |
"/ acute |
|
566 |
||
567 |
Aacute 16rC1 |
|
568 |
Eacute 16rC9 |
|
569 |
Iacute 16rCD |
|
570 |
Oacute 16rD3 |
|
571 |
Uacute 16rDA |
|
572 |
Yacute 16rDD |
|
573 |
aacute 16rE1 |
|
574 |
eacute 16rE9 |
|
575 |
iacute 16rED |
|
576 |
oacute 16rF3 |
|
577 |
uacute 16rFA |
|
578 |
yacute 16rFD |
|
579 |
||
580 |
"/ circumflex |
|
581 |
||
582 |
Acircumflex 16rC2 |
|
609 | 583 |
Ecircumflex 16rCA |
584 |
Icircumflex 16rCE |
|
585 |
Ocircumflex 16rD4 |
|
586 |
Ucircumflex 16rDB |
|
587 |
acircumflex 16rE2 |
|
588 |
ecircumflex 16rEA |
|
589 |
icircumflex 16rEE |
|
590 |
ocircumflex 16rF4 |
|
591 |
ucircumflex 16rFB |
|
122 | 592 |
|
593 |
"/ tilde |
|
594 |
||
609 | 595 |
Atilde 16rC3 |
596 |
Ntilde 16rD1 |
|
597 |
atilde 16rE3 |
|
598 |
ntilde 16rF1 |
|
122 | 599 |
|
600 |
"/ ring |
|
601 |
||
609 | 602 |
Aring 16rC4 |
603 |
aring 16rE4 |
|
122 | 604 |
|
605 |
"/ ligatures |
|
606 |
||
609 | 607 |
AE 16rC5 |
608 |
ae 16rE5 |
|
122 | 609 |
ssharp 16rDF |
610 |
||
611 |
"/ cedilla |
|
612 |
||
609 | 613 |
Ccedilla 16rC7 |
614 |
ccedilla 16rE7 |
|
122 | 615 |
|
616 |
"/ slashed |
|
617 |
||
609 | 618 |
Ooblique 16rD8 |
619 |
oslash 16rF8 |
|
122 | 620 |
|
621 |
"/ misc (if on your keyboard) |
|
622 |
||
623 |
Eth 16rD0 "/ some old servers still use this |
|
609 | 624 |
ETH 16rD0 |
625 |
eth 16rF0 |
|
626 |
multiply 16rD7 |
|
122 | 627 |
Thorn 16rDE "/ some old servers still use this |
628 |
THORN 16rDE "/ some old servers still use this |
|
609 | 629 |
division 16rF7 |
630 |
thorn 16rFE |
|
122 | 631 |
|
632 |
section 16rA7 |
|
633 |
degree 16rB0 |
|
634 |
twosuperior 16rB2 |
|
635 |
threesuperior 16rB3 |
|
636 |
mu 16rB5 |
|
637 |
) pairWiseDo:[:symbolic :numeric | |
|
638 |
map bindValue:(Character value:numeric) to:symbolic. |
|
639 |
]. |
|
92 | 640 |
|
641 |
"* |
|
122 | 642 |
* need more here (katakana, arabic, cyrillic, greek etc.) |
92 | 643 |
*" |
644 |
||
645 |
"* |
|
646 |
* numeric keypad - binding to normal numeric keys |
|
647 |
*" |
|
648 |
"/ map bindValue:$0 to:#'KP_Insert'. |
|
649 |
"/ map bindValue:$1 to:#'KP_End'. |
|
650 |
"/ map bindValue:$2 to:#'KP_Down'. |
|
651 |
"/ map bindValue:$3 to:#'KP_Next'. |
|
652 |
"/ map bindValue:$4 to:#'KP_Left'. |
|
653 |
"/ map bindValue:$5 to:#'KP_Begin'. |
|
654 |
"/ map bindValue:$6 to:#'KP_Right'. |
|
655 |
"/ map bindValue:$7 to:#'KP_Home'. |
|
656 |
"/ map bindValue:$8 to:#'KP_Up'. |
|
657 |
"/ map bindValue:$9 to:#'KP_Prior'. |
|
380 | 658 |
map bindValue:#Return to:#'KP_Enter'. |
659 |
map bindValue:#Delete to:#'KP_Delete'. |
|
92 | 660 |
|
661 |
||
86 | 662 |
"/ remove these lines, if your keyboard has a COMPOSE-key. |
663 |
"/ None of our Xdisplays here has one - so we simulate it using CTRL-R ... |
|
609 | 664 |
"/ which on some (of our) servers comes pretranslated as Multi_key, |
327 | 665 |
"/ CtrlMulti_key or even Mode_switch. |
86 | 666 |
|
327 | 667 |
map bindValue:#Compose to:#'Control_R'. "/ the right compose key |
455
1bc57270b5d7
added Cmd-Shift-B as BrowseIt shortCut
Claus Gittinger <cg@exept.de>
parents:
442
diff
changeset
|
668 |
"/ map bindValue:#Compose to:#'Control_L'. "/ the right compose key |
327 | 669 |
map bindValue:#Compose to:#'Multi_key'. "/ the right compose key |
670 |
map bindValue:#Compose to:#'CtrlMulti_key'. "/ the right compose key |
|
609 | 671 |
"/ map bindValue:#Compose to:#'Mode_switch'. |
86 | 672 |
|
673 |
||
674 |
"/ a kludge: some Xservers send #Delete for both the backspace |
|
675 |
"/ and the Delete key. In this case, we use the Backspace function |
|
676 |
"/ for both keys. If your Xserver does not do this (it should not) |
|
677 |
"/ remove or comment the following 'bindValue:#BackSpace'-line: |
|
678 |
"/ |
|
679 |
||
356 | 680 |
"/ map bindValue:#BackSpace to:#Delete. |
86 | 681 |
|
41 | 682 |
"/ |
683 |
"/ my personal preferences - comment it, if you do not like them |
|
684 |
"/ bind function and other keys as: |
|
685 |
"/ |
|
686 |
"/ F1 - again |
|
484 | 687 |
"/ F2 - completion |
41 | 688 |
"/ F3 - comment-it |
689 |
"/ F4 - uncomment-it |
|
690 |
"/ F5 - paste shell output |
|
691 |
"/ F9 - undent by 4 |
|
692 |
"/ F10 - indent by 4 |
|
693 |
"/ Control-R - Compose key |
|
694 |
"/ Break - UserInterrupt |
|
695 |
||
696 |
"/ |
|
697 |
"/ convenient functions on the keyboard |
|
698 |
"/ |
|
699 |
map bindValue:#Again to:#F1. |
|
700 |
map bindValue:#UserInterrupt to:#Break. |
|
89 | 701 |
"/ map bindValue:#PrintIt to:#Print. "/ called PrintScreen on most keyboards |
702 |
"/ map bindValue:#InspectIt to:#Execute. "/ called SysReq on most keyboards |
|
41 | 703 |
|
88 | 704 |
map bindValue:#SaveAs to:#CmdS. |
705 |
||
481 | 706 |
"/ xxxF5 -> macro ReplaceSelectionByUnixCommandsOutput (unix command output paste) |
460 | 707 |
"/ CtrlTab -> macro ToggleTabs (toggle 4/8 tabs) |
708 |
"/ F10 -> macro IndentBy4 (indent by 4) |
|
709 |
"/ F9 -> macro UndentBy4 (undent by 4) |
|
710 |
"/ F12 -> macro IndentBy1 (indent by 1) |
|
711 |
"/ F11 -> macro UndentBy1 (undent by 1) |
|
484 | 712 |
"/ F2 -> completion |
292 | 713 |
"/ F3 -> commentSelection |
714 |
"/ F4 -> uncommentSelection |
|
41 | 715 |
|
481 | 716 |
"/ map bindValue:#ReplaceSelectionByUnixCommandsOutput to:#F5. |
41 | 717 |
"/ map bindValue:#CmdF97 to:#F7. |
718 |
"/ map bindValue:#CmdF96 to:#F6. |
|
643 | 719 |
|
460 | 720 |
map bindValue:#IndentBy4 to:#F10. |
721 |
map bindValue:#UndentBy4 to:#F9. |
|
41 | 722 |
|
460 | 723 |
map bindValue:#IndentBy1 to:#F12. |
724 |
map bindValue:#UndentBy1 to:#F11. |
|
292 | 725 |
|
548
6daf7f816f04
F6 is now: convert selection to uppercase-first words. (was uppercase)
Claus Gittinger <cg@exept.de>
parents:
547
diff
changeset
|
726 |
"/ map bindValue:#ConvertSelectionToLowercase to:#F6. |
586 | 727 |
map bindValue:#ConvertSelectionToLowercase to:#F6. |
728 |
map bindValue:#ConvertSelectionToUppercaseFirst to:#F7. |
|
684 | 729 |
map bindValue:#ConvertSelectionToUppercase to:#CtrlF7. |
730 |
map bindValue:#ConvertSelectionToUppercase to:#CmdF7. |
|
457 | 731 |
|
41 | 732 |
map bindValue:#CommentSelection to:#F3. |
733 |
map bindValue:#UncommentSelection to:#F4. |
|
734 |
||
550 | 735 |
map bindValue:#LearnKeyboardMacro to:#CmdL. |
438 | 736 |
map bindValue:#ExecuteKeyboardMacro to:#CmdM. |
737 |
||
481 | 738 |
map bindValue:#CodeCompletion to:#F2. |
438 | 739 |
|
609 | 740 |
"/ map bindValue:#PasteBlockEvaluationsOutput to:#CmdV. |
487 | 741 |
|
41 | 742 |
"/ |
743 |
"/ since some of my machines have german keyboards ;-) |
|
744 |
"/ and I like to be able to edit my files on all machines, |
|
745 |
"/ I need a translation in both ways. |
|
746 |
"/ you'd normally not define things in both directions. |
|
747 |
"/ |
|
609 | 748 |
"/ actually, these things belong into the servers modmap or |
57 | 749 |
"/ into a display specific d_<displayName>.rc ... |
41 | 750 |
"/ |
751 |
"/ german national characters on a US keyboard: |
|
140 | 752 |
"/ comment this, if you have a german keyboard. |
41 | 753 |
"/ |
140 | 754 |
"/map bindValue:(Character value:16rFC) to:#'Cmd['. "/ u dieresis |
755 |
"/map bindValue:(Character value:16rE4) to:#'Cmd'''. "/ a dieresis |
|
756 |
"/map bindValue:(Character value:16rF6) to:#'Cmd;'. "/ o dieresis |
|
757 |
"/map bindValue:(Character value:16rDC) to:#'Cmd{'. "/ U dieresis |
|
758 |
"/map bindValue:(Character value:16rC4) to:#'Cmd"'. "/ A dieresis |
|
759 |
"/map bindValue:(Character value:16rD6) to:#'Cmd:'. "/ O dieresis |
|
760 |
"/map bindValue:(Character value:16rDF) to:#'Cmd-'. "/ s-sharp |
|
41 | 761 |
|
762 |
"/ |
|
122 | 763 |
"/ US characters on national keyboards: |
764 |
"/ (on many national keyboards, the x-server does NOT correctly |
|
765 |
"/ xlate characters .... on others, it does and you may remove/comment |
|
766 |
"/ the following.) |
|
41 | 767 |
"/ |
768 |
map bindValue:$[ to:#'Alt['. |
|
769 |
map bindValue:$] to:#'Alt]'. |
|
770 |
map bindValue:$| to:#'Alt|'. |
|
771 |
map bindValue:${ to:#'Alt{'. |
|
57 | 772 |
map bindValue:$} to:#'Alt}'. |
122 | 773 |
map bindValue:$\ to:#'Alt\'. |
140 | 774 |
map bindValue:$~ to:#'Alt~'. |
775 |
map bindValue:$@ to:#'Alt@'. |
|
776 |
||
609 | 777 |
map bindValue:$[ to:#'Cmd['. |
140 | 778 |
map bindValue:$] to:#'Cmd]'. |
779 |
map bindValue:$| to:#'Cmd|'. |
|
780 |
map bindValue:${ to:#'Cmd{'. |
|
781 |
map bindValue:$} to:#'Cmd}'. |
|
782 |
map bindValue:$\ to:#'Cmd\'. |
|
783 |
map bindValue:$~ to:#'Cmd~'. |
|
784 |
map bindValue:$@ to:#'Cmd@'. |
|
497 | 785 |
map bindValue:$# to:#'Cmd#'. |
140 | 786 |
|
122 | 787 |
|
41 | 788 |
! |