anchor.diff:  
   The key bindings alist is stored in the bindings slot of the object.
   
  +An external keymap can be defined so several objects can share the same
  +set of bindings.
  +
  +Object-local bindings override the external keymap. The local bindings
  +are checked first for a handler, then the external keymap.
  +
   If no handler is defined for the event, the default event handler t is tried.
   If not even a default handler is defined, the event is ignored.
   
  
positive.code: An event should be bound to the pre-defined function exit-event-loop."
    (flet ((ev (event)
             (let ((keymap (typecase (keymap object)
                             (keymap (keymap object))
                             (symbol (find-keymap (keymap object))))))
               ;; object-local bindings override the external keymap
               ;; an event is checked in the bindings first, then in the external keymap.
               (if (bindings object)
                   (if (assoc event (bindings object))
                       (assoc event (bindings object))
                       (if (and keymap (bindings keymap))
                           (assoc event (bindings keymap))
                           nil))
  
negative.code: delay in miliseconds.
  
  Example use: (bind scr #\q  (lambda (win event) (throw 'event-loop :quit)))"
    (with-accessors ((bindings bindings)) object
      (cond ((or (null event)
                 (atom event))
             (setf bindings (acons event handler bindings)))
            ((listp event)
             (dolist (e event)
               (setf bindings (acons e handler bindings)))))))
  
  (defun unbind (object event)
    "Remove the event and the handler function from object's bindings alist.
  
  If event is a list of events, remove each event separately from the alist."
    (with-accessors ((bindings bindings)) object
      (cond ((or (null event)
                 (atom event))
             (setf bindings (remove event bindings :key #'car)))
            ((listp event)
             (dolist (e event)
               (setf bindings (remove e bindings :key #'car)))))))
  
  (defparameter *keymaps* nil "An alist of available keymaps.")
  
  