Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Use alt+scroll for less sensitive zoom.

You can also hit "1" to reset your viewport to the origin with no zoom.

It's a bit of an oddity that ctrl + scroll works at all--mac trackpads set the ctrl key bit on the event when you use pinch-to-zoom. At the normal rate, the pinch-to-zoom feels too sluggish, so I speed it up by 10x. Unfortunately, I can't find a way to tell the difference between pinch-to-zoom on a mac trackpad and normal ctrl + scroll.



Would something like this work?

    ontouchstart: scrollMultiplier = 10;
    ontouchend: if(evt.touches.length === 1) scrollMultiplier = 1;


I would have thought it would be a touch event, but it's actually a normal scroll event. The only difference I can see is that it has the ctrl bit flipped.

Here's the stackoverflow answer: http://stackoverflow.com/questions/15416851/catching-mac-tra...


I understand that, but do any of the touch events fire in parallel? Like, just before the pinch happens, is there not a touch start even for when the fingers touch the screen? The idea is to change the rate of the normal scroll event only if there are fingers on the screen.


I don't think there are any touch events at all when you're using a trackpad on a mac. For mobile, we can distinguish by the touch events.


Oh, yes, I'm sorry. I completely spaced on what you were saying.


Probably for interoperability for applications that use "standard" ctrl-scroll for zoom.

It's a relatively common shortcut.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: