   hook 'populate', 0, ->
     @handwrittenBlocks = []
 
-    @shiftKeyPressed = false
-
-    # Keep track of whether the shift
-    # key is pressed; it will
-    # suppress the normal "enter"
-    # handler.
-    @keyListener.register_combo
-      keys: 'shift'
-      on_keydown: => @shiftKeyPressed = true
-      on_keyup: => @shiftKeyPressd = false
-
     @keyListener.register_combo
       keys: 'enter'
-      on_keydown: =>
-        unless @textFocus? or @shiftKeyPressed
+      on_keydown: (event) =>
+        unless @textFocus? or event.shiftKey
           @setTextInputFocus null
 
           # Construct the block; flag the socket as handwritten


    return head.container

  hook 'key.tab', 0, ->
    if @shiftKeyPressed
      if @textFocus? then head = @textFocus.start
      else head = @cursor


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