[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Adding modifiers to event

From: Juanma Barranquero
Subject: Adding modifiers to event
Date: Thu, 8 Mar 2007 15:30:17 +0100

I want to add modifiers to a keyboard event.

Is there any easier way than this?

(defun add-modifiers (event &rest modifiers)
 (let ((e (event-basic-type event))
       (m (event-modifiers event)))
   (if (null e)
       (error "Unrecognized event %S" event)
     (dolist (modifier modifiers)
       (pushnew modifier m :test #'eq))
     (event-convert-list (append m (list e))))))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]