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