 
           @newHandwrittenSocket = newSocket
 
-        else if @textFocus? and not @shiftKeyPressed
+        else if @textFocus? and not event.shiftKey
           @setTextInputFocus null; @redrawMain()
         else
           return true

          w: MAX_DROP_DISTANCE * 2
          h: MAX_DROP_DISTANCE * 2
        }, (point) =>
          unless (point.acceptLevel is helper.DISCOURAGED) and not @shiftKeyPressed
            distance = mainPoint.from(point)
            distance.y *= 2; distance = distance.magnitude()
            if distance < min and mainPoint.from(point).magnitude() < MAX_DROP_DISTANCE and

  hook 'populate', 0, ->
    @handwrittenBlocks = []

    @keyListener.register_combo
      keys: 'enter'
      on_keydown: (event) =>
        unless @textFocus? or event.shiftKey
          @setTextInputFocus null

          # Construct the block; flag the socket as handwritten
