About Monkey 2 › Forums › Monkey 2 Development › Mac mouse wheel very fast
This topic contains 11 replies, has 5 voices, and was last updated by 
 Simon Armstrong 1 year, 12 months ago.
- 
		AuthorPosts
 - 
		
			
				
April 18, 2017 at 2:26 am #7944
The mouse wheel is very sensitive in MojoX.
For example, in the Ted2 IDE, if I just scroll the wheel a tiny bit, I’ve jumped about 30 lines.
I’ve set the mouse wheel in MacOS settings to the lowest, and it’s very slow in webpages, but still very fast in MojoX.
I’d say it’s to the point where it’s basically impossible to use the mouse wheel to scroll in Ted2.This is on latest macOS Sierra, using an “official Mac mouse”, the basic white one.
April 19, 2017 at 9:14 pm #7967According to SDL2, macOS mouse wheel was “fixed” in the current version which monkey2 is running.
I tried to find the issue but only found this one which is about a patch for improved precision – https://bugzilla.libsdl.org/show_bug.cgi?id=2293
I suspect you will need a #if MacOS to fix this issue for now.
April 23, 2017 at 1:22 am #8010For example, in the Ted2 IDE, if I just scroll the wheel a tiny bit, I’ve jumped about 30 lines.
I am not getting this effect on macos here. One ‘wheel click’=about 2 lines of code scrolling in ted2, on both macos/windows.
I am however getting wheel.y values oustide the range [-1,1] only on macos. On windows, wheel.y is always -1, 0 or 1.
What values are you getting from this code? For me, one ‘click’ of the wheel is -1 or 1. On macos, spinning wheel faster gives greater values:
Monkey123456789101112131415161718192021222324252627282930313233343536373839Namespace myapp#Import "<std>"#Import "<mojo>"Using std..Using mojo..Class MyWindow Extends WindowMethod New( title:String="Simple mojo app",width:Int=640,height:Int=480,flags:WindowFlags=Null )Super.New( title,width,height,flags )EndMethod OnRender( canvas:Canvas ) OverrideApp.RequestRender()canvas.DrawText( "Hello World!",Width/2,Height/2,.5,.5 )EndMethod OnMouseEvent( event:MouseEvent ) OverrideIf event.Type=EventType.MouseWheel Print event.Wheel.yEndEndFunction Main()New AppInstanceNew MyWindowApp.Run()EndApril 23, 2017 at 5:07 am #8014I use the mouse wheel on macOS and windows and it gives normal results.
On macOS you can get much bigger values that one as it sends that information. works brilliantly with a trackpad
April 23, 2017 at 2:41 pm #8022Works fine here on my 2013 MacBook. How are you using it?
April 23, 2017 at 2:48 pm #8023https://puu.sh/vtB8C/e2b6fa58db.mp4
I think that video shows the issue pretty well.
If I do a scroll over the wheel like that on a webpage, it jumps down a tiny bit (on Mac)
But in Ted, I’ve jumped to almost line 100.
A spin on the wheel on my PC and I’m not even at line 20.April 23, 2017 at 3:31 pm #8024That video doesn’t load on my MacBook’s Safari.
April 23, 2017 at 4:09 pm #8025That video doesn’t load on my MacBook’s Safari.
Works fine here on my 2013 MacBook. How are you using it?
Seriously though, you can right click it and select download.
April 23, 2017 at 6:21 pm #8028> Seriously though, you can right click it and select download.
funny way of responding to two different comments.
Seriously though, that video doesn’t play on my MacBook either way.
April 23, 2017 at 11:06 pm #8031Can you try a normal/windows mouse on the mac?
Also, hard to see how much scrolling is going on. Can you just show the screen while you try to scroll ‘click by click’?
April 24, 2017 at 5:40 am #8034nope, video doesn’t play on my mac. All i get is a volume indicator.
mmmm sorta confirmed, but….
I loaded ted2go with a large file
using the scroll wheel the text jumps in blocks of 4. if I remember correct this is how the internal mojo text editor operates. one tick from the mouse wheel is *4
So there is nothing wrong with the mouse wheel code, it is just the way it is handled with the text control.
April 25, 2017 at 1:56 am #8042I suspect you are getting many events at high frequency.
 - 
		AuthorPosts
 
You must be logged in to reply to this topic.