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