title: Mac Cocoa: To differentiate if a NSScrollWheel event is from a mouse or trackpad?
body: <p>I have found this, but how to pass an <code>NSEvent</code> object and call this function?</p>
  
  <pre><code>- (void)scrollWheel:(NSEvent *)theEvent
  {      
      if(([theEvent momentumPhase] != NSEventPhaseNone) || [theEvent phase] != NSEventPhaseNone))
      {
        //theEvent is from trackpad           
      }
      else 
      {
         //theEvent is from mouse
       }
  }
  </code></pre>