reasonable (they occur about every fifth event but have values five times FixedPtDelta values are the PointDelta values multiplied by 0.1. and Mighty Mouses) and they behave rather differently. There are two devices that provide continuous scrolling events (trackpads value takes acceleration into account, and in fact is identical to the +0.1/-0.1 (but, like above, scaled appropriately for acceleration). This is a fixed value, and for each mouse notch you get a value of no way to get that information out of the event once created. number of axes is used in the creation of a CGScrollWheelEvent, there is This wouldn't be so bad except for the fact that while the fields fails to move the value into the axis2 field (the other two types UIs except for one nasty bug: when the shift key is pressed, this set of +1/-1, but this _does_ take acceleration into account, so you will get In general, for each mouse notch you get a value of This does not take acceleration into account and thus is less For notchy wheel mice (kCGScrollWheelEventIsContinuous = 0) with a non-zero delta will be delivered, containing the accumulated deltas scroll events with delta 0 will be delivered, and every so often an event continuously, events can be delivered in chunks. Fourth, for trackpads there is a concept of chunkiness. fields account for this while others do not. whether you scrolled a little at a time or in one continuous motion. of physical distance will give you different results logically depending on Third, there is a concept of mouse acceleration. kCGScrollWheelEventIsContinuous field. You must check to see which was used for the event by testing the trackpad/Mighty Mouse is used (which both provide continuous scrolling). wheel mouse is used (one that scrolls in discrete units) or a First, these events behave very differently depending on whether a standard terribly helpful in deciding which to use. Apple's documentation () is rather vague in their differences, and not There are three types of scroll data available on a scroll wheel CGEvent. On the application side, there are many relevant and interesting comments at this Chrome change review, and extracted from there this comment: // Of Mice and Men On the API level, Core Graphics / Quartz Event Services provides the CGEvent type. Where is mouse cursor movement acceleration and scroll wheel acceleration implemented in MacOSX?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |