     @notify @_getFooter()
 
   _onKey: (key) ->
+    if config.keyCallback and not config.keyCallback key
+      return
+
     # check if the pressed key is configured
     draw = switch key?.name
       when "q"
-        process.exit 0
-
-      when "w" then @zoomy = 1
-      when "s" then @zoomy = -1
+        if config.quitCallback
+          config.quitCallback()
+        else
+          process.exit 0
 
       when "a" then @zoomBy config.zoomStep
-      when "z" then @zoomBy -config.zoomStep
+      when "z", "y"
+        @zoomBy -config.zoomStep
 
       when "left" then @moveBy 0, -8/Math.pow(2, @zoom)
       when "right" then @moveBy 0, 8/Math.pow(2, @zoom)

    @_draw()

  _onMouseMove: (event) ->
    # start dragging
    if event.button is "left"
      if @mouseDragging

    "mouse: #{utils.digits @mousePosition.lat, 3}, #{utils.digits @mousePosition.lon, 3} "

  notify: (text) ->
    config.onUpdate() if config.onUpdate
    @_write "\r\x1B[K"+text unless config.headless

  _write: (output) ->
