On Wed, Jun 3, 2009 at 10:47 PM, Elliott Slaughter < elliottslaugh...@gmail.com> wrote:
> On Wed, Jun 3, 2009 at 9:08 PM, Luke Crook <l...@balooga.com> wrote: > >> - :MOD-KEY returns a list of the currently depressed modifiers. So for >> example; >> (:KEY-DOWN-EVENT (:MOD-KEY MOD-KEY) >> (FORMAT T "Currently depressed modifiers: ~A~%" mod-key)) >> > > Can the modifiers in mod-key be depended upon to be in any particular > order? > The code relies on the modifier order returned by cffi:foreign-enum-keyword-list. If this remains the same between CFFI revisions then, yes. You can see the code below. (remove nil (loop for key in (cffi:foreign-enum-keyword-list 'sdl-cffi::sdl-mod) collect (when (> (logand mod-state (foreign-enum-value 'sdl-cffi::sdl-mod key)) 0) key))) Why do you need the results in a particular order? - Luke
_______________________________________________ application-builder mailing list application-builder@lispniks.com http://www.lispniks.com/mailman/listinfo/application-builder