anchor.diff:                   :hyper-mask "hyper")))
       (delete nil (mapcar (lambda (mod) (getf plist mod)) modifier-state))))
   
  +#+darwin
  +(defun key-event-modifiers (key-event)
  +  (declare (ignore key-event))
  +  (modifiers *browser*))
  +
  +#-darwin
  +(defun key-event-modifiers (key-event)
  +  (gdk:gdk-event-key-state key-event))
  +
   ;; REVIEW: Remove after upstream fix is merged in Quicklisp, see https://github.com/crategus/cl-cffi-gtk/issues/74.
   (defun gdk-event-button-state (button-event)
     "Return BUTTON-EVENT modifiers as a `gdk-modifier-type', i.e. a list of keywords."
  
positive.code: 
  #+darwin
  (defmethod push-modifier ((browser gtk-browser) event)
    (let* ((modifier-state (match (type-of event)
                             ('gdk:gdk-event-key (gdk:gdk-event-key-state event))
                             ('gdk:gdk-event-button (gdk-event-button-state event))))
           (key-value (match (type-of event)
                        ('gdk:gdk-event-key (gdk:gdk-event-key-keyval event))
                        (_ 0)))
           (key-value-name (gdk:gdk-keyval-name key-value)))
      (when (member :control-mask modifier-state)
        (push "control" (modifiers browser)))
      (when (member :shift-mask modifier-state)
        (push "shift" (modifiers browser)))
      (when (or (member :mod1-mask modifier-state)
                (string= key-value-name "Arabic_switch"))
        (push "meta" (modifiers browser)))
      (when (or (member :super-mask modifier-state)
                (and (member :mod2-mask modifier-state)
                     (member :meta-mask modifier-state)))
        (push "super" (modifiers browser))))
    (setf (modifiers browser) (delete-duplicates (modifiers browser) :test #'equal)))
  
  #+darwin
  (defmethod pop-modifier ((browser gtk-browser) event)
  
negative.code:               :documentation "On macOS some modifiers like Super and Meta are
  seen like regular keys.
  To work around this issue, we store them in this list while they are pressed.
  See `push-modifiers', `pop-modifiers' and `key-event-modifiers'.")
     (modifier-translator :accessor modifier-translator
                          :initform #'translate-modifiers
                          :type function
                          :documentation "Function that returns a list of
  modifiers understood by `keymap:make-key'.  You can customize this slot if you
  