Function: tool-bar-apply-modifiers

tool-bar-apply-modifiers is a byte-compiled function defined in tool-bar.el.gz.

Signature

(tool-bar-apply-modifiers EVENT MODIFIERS)

Documentation

Apply the specified list of MODIFIERS to EVENT.

MODIFIERS must be a list containing only the symbols alt, super, hyper, shift, control and meta. Return EVENT with the specified modifiers applied.

Source Code

;; Defined in /usr/src/emacs/lisp/tool-bar.el.gz
;; These functions are very similar to their counterparts in
;; simple.el, but allow combining multiple modifier buttons together.

(defun tool-bar-apply-modifiers (event modifiers)
  "Apply the specified list of MODIFIERS to EVENT.
MODIFIERS must be a list containing only the symbols `alt',
`super', `hyper', `shift', `control' and `meta'.
Return EVENT with the specified modifiers applied."
  (dolist (modifier modifiers)
    (cond
     ((eq modifier 'alt)
      (setq event (event-apply-modifier event 'alt 22 "A-")))
     ((eq modifier 'super)
      (setq event (event-apply-modifier event 'super 23 "s-")))
     ((eq modifier 'hyper)
      (setq event (event-apply-modifier event 'hyper 24 "H-")))
     ((eq modifier 'shift)
      (setq event (event-apply-modifier event 'shift 25 "S-")))
     ((eq modifier 'control)
      (setq event (event-apply-modifier event 'control 26 "C-")))
     ((eq modifier 'meta)
      (setq event (event-apply-modifier event 'meta 27 "M-")))))
  event)