       # The constants in the duration calculation, above, are chosen to provide reasonable scroll speeds for
       # scrolls resulting from distinct keypresses.  For continuous scrolls (where the key remains depressed),
       # some scrolls are too slow, and others too fast.  Here, we compensate a bit.
-      if isKeyStillDown() and 50 <= totalElapsed and 0.5 <= calibration <= 1.6
+      if isMyKeyStillDown() and 50 <= totalElapsed and 0.5 <= calibration <= 1.6
         calibration *= 1.05 if 1.05 * calibration * amount <= 150 # Speed up slow scrolls.
         calibration *= 0.95 if 150 <= 0.95 * calibration * amount # Slow down fast scrolls.
 
       # Calculate the initial delta, rounding up to ensure progress.  Then, adjust delta to account for the
       # current scroll state.
       delta = Math.ceil amount * (elapsed / duration) * calibration
-      delta = if isKeyStillDown() then delta else Math.max 0, Math.min delta, amount - totalDelta
+      delta = if isMyKeyStillDown() then delta else Math.max 0, Math.min delta, amount - totalDelta
 
       if delta and performScroll element, direction, sign * delta
         totalDelta += delta

# input elements. This mechanism allows us to decide whether to scroll a div or to scroll the whole document.
#
activatedElement = null
settings = null

scrollProperties =
  x: {


    element = findScrollableElement activatedElement, direction, pos
    amount = getDimension(element,direction,pos) - element[scrollProperties[direction].axisName]
    CoreScroller.scroll element, direction, amount

root = exports ? window
root.Scroller = Scroller
