ButtonController.st
changeset 220 635d3f583f61
parent 203 8a38b0b03233
child 258 ae4b8f1a6738
--- a/ButtonController.st	Sun Dec 03 21:58:47 1995 +0100
+++ b/ButtonController.st	Sun Dec 03 21:59:18 1995 +0100
@@ -12,8 +12,8 @@
 
 Controller subclass:#ButtonController
 	 instanceVariableNames:'enableChannel pressChannel releaseChannel pressed active entered
-                isTriggerOnDown autoRepeat repeatBlock initialDelay repeatDelay
-                pressActionBlock releaseActionBlock isToggle'
+		isTriggerOnDown autoRepeat repeatBlock initialDelay repeatDelay
+		pressActionBlock releaseActionBlock isToggle'
 	 classVariableNames:''
 	 poolDictionaries:''
 	 category:'Interface-Support-Controllers'
@@ -513,6 +513,8 @@
      enough; it simulates a release-press, by evaluating both release
      and press actions."
 
+    |dly|
+
     pressed ifTrue:[
 	enableChannel value ifTrue:[
 	    active ifFalse:[
@@ -523,7 +525,12 @@
 "/                active := false.
 
 		autoRepeat ifTrue:[
-		    Processor addTimedBlock:repeatBlock afterSeconds:repeatDelay
+		    self sensor shiftDown ifTrue:[
+			dly := repeatDelay / 4.
+		    ] ifFalse:[
+			dly := repeatDelay
+		    ].
+		    Processor addTimedBlock:repeatBlock afterSeconds:dly
 		]
 	    ]
 	]
@@ -550,5 +557,5 @@
 !ButtonController class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/ButtonController.st,v 1.23 1995-11-23 17:46:11 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/ButtonController.st,v 1.24 1995-12-03 20:59:18 cg Exp $'
 ! !