title: MacOS Get trackpad pressure globally
body: <p>I'm trying to get MacBook Pro trackpad pressure with following code:</p>
  
  <pre><code>CGEventRef eventTapCallback(CGEventTapProxy proxy, CGEventType type, CGEventRef eventRef, void *refcon) {
      NSEvent *event = [NSEvent eventWithCGEvent:eventRef];
  
      NSLog(@"%lld", (int64_t)CGEventGetIntegerValueField(eventRef, kCGMouseEventPressure)); // returns 0
      NSLog(@"%lld", (int64_t)CGEventGetIntegerValueField(eventRef, kCGTabletEventPointPressure)); // returns 0
      NSLog(@"%lld", (int64_t)CGEventGetIntegerValueField(eventRef, kCGTabletEventTangentialPressure)); // returns 0
  
      NSLog(@"%f", [event pressure]); // Assertion failure
  
      return eventRef;
  }
  </code></pre>
  
  <p>Do you have any idea how to do that?</p>