Can I find out how much a Magic Mouse has scrolled by in a IOHIDDeviceRegisterInputValueCallback function?
I am trying to detect the scrolling gesture from a Magic Mouse using the CFCallbacks. I have it working fine with a standard USB mouse with a scroll wheel, but it seems that the Magic Mouse reports scrolling in a different way.
Thanks.
I ended up getting the scroll information from the window event in Cocoa instead. Not a full fix for this issue but I still was able to access the scroll message.
Related
I use SkiaSharp canvas to draw the main game screen, and then there are various Xamarin.Forms Buttons around the UI. This all works fine on when used directly on iPhone or iPad using a finger. However, when I connect a mouse (e.g., through a MacBook or otherwise), the buttons start working with about 10% chance after mouse-clicking on the SkiaSharp canvas (and not receiving the mouse click events with 90% chance). The SkiaSharp canvas itself works just fine.
If I bring up the iOS app launch menu from the bottom (which probably somehow temporarily exists the mouse navigation on the app), the buttons start working again with the mouse. But if I click the SkiaSharp canvas again with the mouse, the buttons have a high chance of becoming disabled again. If I change to using a finger, all works fine (even if the mouse clicks were not being registered immediately before). However, mouse clicks are not being registered even after touching with a finger, so finger-touching does not reset the issue with the mouse (but bringing up the menu from the bottom does).
We found this bug by testing the iOS game on MacBook Pro (the iOS apps recently came available on the App Store) but the same issue persists also directly with an iPad / mouse combination. It seems to be some sort of an issue between using a mouse (on iPad or on MacBook Pro), SkiaSharp canvas and Xamarin.Forms buttons.
Does anyone know what the root cause of the problem is and what is the workaround?
Not an answer as such, but some more information about reproducing the issue: A simpler repro case may be this small project: https://github.com/jrc14/TraceMatching/ .
Don't worry too much about what it's doing, but note that you're mean to click in the grey Skia canvas in the middle to create 'targets' - and that after you've done that, mouse-clicks are getting lost.
If you run it on a Mac, you'll see that, though the clicks get lost after you've clicked on the Skia canvas, they will start being received again if you click on something else (another app, or the Mac background).
(further edit) - after some noodling around I did find a workaround. If, once you've finished processing the touch action on the SKCanvasView, you reset its EnableTouchEvents property (i.e. set it to false, then back to true again), it seems that the clicks don't get lost any more,
Due to performance issues I've change our wall scrolling to use native scrolling (overflow-scroll) instead of js scrolling. (The infinite scroll is working)
The performance is somewhat better but here is the weird thing:
In android, when I scroll down, it just doesn't scroll down after some scrolling (scroll back up is working). When I do something like opening and closing the statusbar of the physical/simulator phone, then it is working again.
I guess it something related to the element refresh of the android WebView, any idea?
I've been trying to find a way to scroll horizontally by using shift+mouse scroll (mouse scroll alone would of course only scroll vertically), in any Windows (XP) application. Can anyone suggest a simple way to do this? I tried the software AutoHotKey, but none of the scripts that were meant to do that worked for me.
Thanks!
In the latest version of OSX and safari you can use mouse swipe gestures to go forwards and backwards through your browser history. my problem: I have a page with a horizontally scrolling image gallery. If you're using the mouse swipe gesture to scroll through the images, when you get to the end of the images its very easy to swipe into the next or previous page...
does anyone know a way to explicitly disable this using css or any other method?
Perhaps the following documents can help:
Handling Gesture Events
Preventing Default Behaviour
: with event.preventDefault();
These might only apply to iOS though.
Aside from that, I would say it's just how the browser handles the gestures, similar to how mouse-wheel scrolling will scroll a DIV block until it reaches the end then start to scroll the page as a whole.
Unfortunately, there's no way to prevent this behaviour since it's a browser gesture (event.preventDefault() on touchstart event won't work).
I'm a newbie to Mac (coming from Microsoft world). I wan't to zoom in / out a webpage in Safari, but cannot find a way to do it (in Windows I would just hit ctrl + mouse wheel), but that doesn't seem to work. I don't wan't to zoom the whole desktop, just the webpage to get the fonts etc. little bit bigger. Is there some key-combination i'm missing?
Command and + at the same time. Command and - will zoom out.
If you're on a Macbook, there are some trackpad motions you can use. Otherwise, you can also use control+scroll up/down to zoom in/out (scrolling by either using two fingers on the trackpad or using a scroll button on your mouse (if you're using a Mighty Mouse then there's a motion you can use for scrolling)).