Login  Register

Re: MouseWheel events

Posted by Matthieu on May 11, 2015; 5:17am
URL: https://forum.world.st/MouseWheel-events-tp4824839p4825622.html

That is correct by default, but you can always hack the VM if you reeeeally
want that behavior. Also, if you just wait a bit, I'm in the process of
remapping the wheel simulation shortcuts to be extremely less likely to
conflict with actual keyboard events. It is already done for Mac. I wrote
the patch for GNU/Linux & Windows, but didn't have machines available when I
was testing (the code may take a bit of massaging to compile). The upside is
that it's a backward compatible VM change, so you will be able to take
advantage of it in any Pharo version that will run on the latest VMs.

Okay, no problem I'll wait.

No, you would code it the same way. In the image, MouseWheelEvents are
created regardless of the keyboard event used to simulate them. The only
thing different would be the keyboard equivalents.

Okay, I double checked that and in the Pharo 4 version of the VM found on http://pharo.org/download by clicking the big blue "windows" button MouseWheel events are not created on an actual mouse wheel because the charcode returned is 0.
But with the latest VM it works and mousewheel events are indeed created so it is my fault for not using the latest VM :)

Thanks a lot !

2015-05-11 2:34 GMT+02:00 Sean P. DeNigris <[hidden email]>:
Matthieu Lacaton wrote
> Let's say for example thant I want to create a rectangle on the screen and
> be able to move it up and down by pressing CTRL + up / down arrow and be
> able to rotate it with the mouse wheel. Does this mean that on Linux I
> just
> can't ?

That is correct by default, but you can always hack the VM if you reeeeally
want that behavior. Also, if you just wait a bit, I'm in the process of
remapping the wheel simulation shortcuts to be extremely less likely to
conflict with actual keyboard events. It is already done for Mac. I wrote
the patch for GNU/Linux & Windows, but didn't have machines available when I
was testing (the code may take a bit of massaging to compile). The upside is
that it's a backward compatible VM change, so you will be able to take
advantage of it in any Pharo version that will run on the latest VMs.


Matthieu Lacaton wrote
> And does this mean that if I create an application able to react to mouse
> wheel, I need to code it differently for Windows and for Linux ?

No, you would code it the same way. In the image, MouseWheelEvents are
created regardless of the keyboard event used to simulate them. The only
thing different would be the keyboard equivalents.



-----
Cheers,
Sean
--
View this message in context: http://forum.world.st/MouseWheel-events-tp4824839p4825605.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.