node-mac-recorder 2.22.13 → 2.22.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-mac-recorder",
3
- "version": "2.22.13",
3
+ "version": "2.22.14",
4
4
  "description": "Native macOS screen recording package for Node.js applications",
5
5
  "main": "index.js",
6
6
  "keywords": [
@@ -2091,6 +2091,23 @@ CGEventRef eventCallback(CGEventTapProxy proxy, CGEventType type, CGEventRef eve
2091
2091
  // Event tipini belirle
2092
2092
  switch (type) {
2093
2093
  case kCGEventLeftMouseDown:
2094
+ eventType = @"mousedown";
2095
+ // Odak/caret çoğu uygulamada tıklamadan hemen sonra oluşur; kısa gecikmeyle AX caret yaz.
2096
+ // (Sadece tuşta emit edilince ilk tıkta timeline'da textInput olmuyordu.)
2097
+ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.028 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
2098
+ if (!g_isCursorTracking || !g_trackingStartTime || !g_fileHandle) return;
2099
+ NSDate *now = [NSDate date];
2100
+ NSTimeInterval ts = [now timeIntervalSinceDate:g_trackingStartTime] * 1000.0;
2101
+ NSTimeInterval unixMs = [now timeIntervalSince1970] * 1000.0;
2102
+ CGPoint loc = CGPointZero;
2103
+ CGEventRef posEv = CGEventCreate(NULL);
2104
+ if (posEv) {
2105
+ loc = CGEventGetLocation(posEv);
2106
+ CFRelease(posEv);
2107
+ }
2108
+ emitTextInputEvent(ts, unixMs, loc);
2109
+ });
2110
+ break;
2094
2111
  case kCGEventRightMouseDown:
2095
2112
  case kCGEventOtherMouseDown:
2096
2113
  eventType = @"mousedown";