There is no mouse-wheel event when the shift key is pressed (shift + mouse-wheel events?)

I am trying to manage some events in lisp using lispbuilder-sdl .

So far, I got it.

;; Load package : (ql:quickload "lispbuilder-sdl") ;; main definition: (defun main (argv) (defparameter *ticks* 0) (sdl:with-init () (sdl:window 100 100 :title-caption "test") (sdl:with-events () (setf (sdl:frame-rate) 60) (:quit-event () (progn (sdl:quit-image) (exit) t)) (:mouse-button-down-event (:button button :xx :yy) (format t "~&LSHIFT: ~a RSHIFT: ~a BUTTON: ~a X: ~d Y: ~d" (sdl:get-key-state :sdl-key-lshift) (sdl:get-key-state :sdl-key-rshift) button xy)) (:key-down-event (:key key) (format t "~& KEY: ~a" key)) (:idle ())))) ;; Entrypoint : (sb-int:with-float-traps-masked (:invalid :inexact :overflow) (main *posix-argv*)) 

If I run this, a window will appear, I can click and flip, I got the output to describe the state of the pressed keys and buttons. Same thing if I press the down key. Good.

But something strange happens when I hold the shift key.

If I do, I still have a way out when clicked. But not when rolling (mouse wheel events).

So, I think that the mouse wheel events just arent triggered when the shift (left or right) is down . But only the shift keys, and I don’t even know why.

Therefore, I cannot, for example, carry shift + mouse-wheel events.

Any idea?

NB . The version of SBCL that I use on OSX is 1.2.11, but it works with both versions 1.3.2 and 1.2.11 on Ubuntu.

+5
source share

All Articles