keyboard.rc
changeset 292 aab8f8feb824
parent 290 611e11479999
child 299 2dbaa24f1a70
equal deleted inserted replaced
291:b6ece4a96c36 292:aab8f8feb824
   153 		    ]
   153 		    ]
   154 		]
   154 		]
   155 	    ].
   155 	    ].
   156 	]
   156 	]
   157 	'.
   157 	'.
       
   158 "/
       
   159 "/ macro to indent by 1
       
   160 "/
       
   161 macros at:#F93 put:'
       
   162 	"indent selected line-range 
       
   163 	 by 1 space (i.e. to the right)"
       
   164 
       
   165 	self selectionStartLine notNil ifTrue:[    
       
   166 	    self selectionStartLine to:self selectionEndLine-1 do:[:lineNr |
       
   167 		|line|
       
   168 
       
   169 		line := self listAt:lineNr.
       
   170 		line notNil ifTrue:[
       
   171 		    line notEmpty ifTrue:[
       
   172 			line := '' '' , line.
       
   173 			self withoutRedrawAt:lineNr put:line.
       
   174 			self invalidateLine:lineNr.
       
   175 		    ]
       
   176 		]
       
   177 	    ].
       
   178 	]
       
   179 	'.
       
   180 
       
   181 "/
       
   182 "/ macro to undent by 1
       
   183 "/
       
   184 macros at:#F92 put:'
       
   185 	"undent selected line-range 
       
   186 	 by 1 space (i.e. to the left)"
       
   187 
       
   188 	self selectionStartLine notNil ifTrue:[    
       
   189 	    self selectionStartLine to:self selectionEndLine-1 do:[:lineNr |
       
   190 		|line|
       
   191 
       
   192 		line := self listAt:lineNr.
       
   193 		line notNil ifTrue:[
       
   194 		    line notEmpty ifTrue:[
       
   195 			(line startsWith:'' '') ifTrue:[
       
   196 			    line := line copyFrom:2.
       
   197 			    self withoutRedrawAt:lineNr put:line.
       
   198 			    self invalidateLine:lineNr.
       
   199 			]
       
   200 		    ]
       
   201 		]
       
   202 	    ].
       
   203 	]
       
   204 	'.
   158 !
   205 !
   159 
   206 
   160 "*
   207 "*
   161  * key bindings common to all display types
   208  * key bindings common to all display types
   162  * use event monitor, to see what the Xserver sends us;
   209  * use event monitor, to see what the Xserver sends us;
   424 "/ map bindValue:#PrintIt       to:#Print.      "/ called PrintScreen on most keyboards
   471 "/ map bindValue:#PrintIt       to:#Print.      "/ called PrintScreen on most keyboards
   425 "/ map bindValue:#InspectIt     to:#Execute.    "/ called SysReq on most keyboards
   472 "/ map bindValue:#InspectIt     to:#Execute.    "/ called SysReq on most keyboards
   426 
   473 
   427 map bindValue:#SaveAs        to:#CmdS.
   474 map bindValue:#SaveAs        to:#CmdS.
   428 
   475 
       
   476 "/ F5      -> macroF99 (unix command ouput paste)
       
   477 "/ CtrlTab -> macroF98 (toggle 4/8 tabs)
       
   478 "/ F10     -> macroF95 (indent by 4)
       
   479 "/ F9      -> macroF94 (undent by 4)
       
   480 "/ F12     -> macroF93 (indent by 1)
       
   481 "/ F11     -> macroF92 (undent by 1)
       
   482 "/ F3      -> commentSelection
       
   483 "/ F4      -> uncommentSelection
   429 
   484 
   430 map bindValue:#CmdF99  to:#F5.
   485 map bindValue:#CmdF99  to:#F5.
   431 map bindValue:#CmdF98 to:#CtrlTab.
   486 map bindValue:#CmdF98 to:#CtrlTab.
   432 "/ map bindValue:#CmdF97 to:#F7.
   487 "/ map bindValue:#CmdF97 to:#F7.
   433 "/ map bindValue:#CmdF96 to:#F6.
   488 "/ map bindValue:#CmdF96 to:#F6.
   434 map bindValue:#CmdF95 to:#F10.
   489 map bindValue:#CmdF95 to:#F10.
   435 map bindValue:#CmdF94 to:#F9.
   490 map bindValue:#CmdF94 to:#F9.
       
   491 
       
   492 map bindValue:#CmdF93 to:#F12.
       
   493 map bindValue:#CmdF92 to:#F11.
   436 
   494 
   437 map bindValue:#CommentSelection to:#F3.
   495 map bindValue:#CommentSelection to:#F3.
   438 map bindValue:#UncommentSelection to:#F4.
   496 map bindValue:#UncommentSelection to:#F4.
   439 
   497 
   440 "/
   498 "/