[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-109210":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":8,"htmlUrl":8,"language":9,"languages":8,"totalLinesOfCode":8,"stars":10,"forks":11,"watchers":12,"openIssues":13,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":15,"stars7d":16,"stars30d":17,"stars90d":14,"forks30d":14,"starsTrendScore":18,"compositeScore":19,"rankGlobal":8,"rankLanguage":8,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":21,"hasPages":21,"topics":23,"createdAt":8,"pushedAt":24,"updatedAt":25,"readmeContent":26,"aiSummary":27,"trendingCount":14,"starSnapshotCount":14,"syncStatus":15,"lastSyncTime":28,"discoverSource":29},109210,"airpointer","musubipapi\u002Fairpointer","musubipapi",null,"Swift",442,56,108,7,0,2,30,280,8,71.27,"MIT License",false,"main",[],"2026-11-09 20:56:33","2026-11-23 20:14:26","\u003Cp align=\"center\">\n  \u003Cimg src=\"Assets\u002FReadme\u002Ficon.png\" width=\"112\" alt=\"The AirPointer icon: the closed case, upright, on a dark tile\">\n\u003C\u002Fp>\n\n\u003Ch1 align=\"center\">AirPointer\u003C\u002Fh1>\n\n\u003Cp align=\"center\">\n  \u003Cstrong>Turn your AirPods case into a pointer for your Mac.\u003C\u002Fstrong>\u003Cbr>\n  Move the closed case to move the cursor. Tap its front to click.\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"Assets\u002FReadme\u002Fconnect.gif\" width=\"100%\" alt=\"The connect steps: open the lid, close the lid, turn the case upright, and point\">\n\u003C\u002Fp>\n\n## Before you use it\n\n| Effect | What happens |\n|---|---|\n| **Case data** | Ending a session uses up the diagnostic data stored on the case. |\n| **AirPods settings** | Some AirPods connection settings stay as the session set them. We do not know yet if this change, or the case data change, lasts after the Bluetooth link resets. |\n| **Audio** | Each connection drops the AirPods' Bluetooth link for a moment, and their audio stops. Do not connect during a call. |\n| **Microphone** | During a session, the app keeps Mac sound and the microphone off all AirPods. It restores them when the session ends. After a force quit, it restores them when you next open the app, if the AirPods are still connected. |\n| **Silent audio** | During a session, the app plays silence to the AirPods to keep their audio link active. You do not hear it. |\n| **Cursor size** | A cursor smaller than 2× grows to 2× while you point. It returns to its size when you pause or disconnect. After a force quit, it returns when you next open the app. This uses a private macOS call. |\n\n## Requirements\n\n| Item | Status |\n|---|---|\n| AirPods Pro 3, macOS 26, Apple Silicon | Tested on one Mac with one pair |\n| AirPods Pro 2 | Recognized, not tested |\n| AirPods paired with your Mac | Required |\n| Xcode | Required to build |\n\nNormal connect and disconnect have run many times on that Mac and pair. These\ncases have not been tested on purpose:\n\n- Force quit during a session\n- Sleep and wake during a session\n- Bluetooth lost during a session\n- Calls and audio during and after a session\n\n## Build and run\n\n```sh\nzsh .\u002Fbuild.sh\nopen AirPointer.app\n```\n\nThe build also runs `--self-test` and the tap check. The other offline checks are\nunder [For developers](#for-developers). Do not build during a pointer session.\n\nIf AirPointer does not appear in the Accessibility list after a rebuild, run:\n\n```sh\ntccutil reset Accessibility local.airpointer\n```\n\n## Set it up\n\nThe first time you open the app, setup has four steps.\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"Assets\u002FReadme\u002Fsetup.png\" width=\"100%\" alt=\"The four setup steps: Allow, Connect, Calibrate and Tap\">\n\u003C\u002Fp>\n\n1. **Allow:** Drag AirPointer into the Accessibility list. This lets it move the\n   cursor and click.\n2. **Connect:** Open the lid, close the lid, set the case down for a moment, and\n   turn it upright.\n3. **Calibrate:** Point at three dots to show the app where your screen is.\n4. **Tap:** Tap the front of the case three times.\n\n## Use it\n\nPress **fn ⌃** in any app to connect. Press it again to pause or resume. To use a\ndifferent shortcut, go to Settings.\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"Assets\u002FReadme\u002Fscreens.png\" width=\"100%\" alt=\"The AirPointer window, the menu bar panel, and the notch while pointing\">\n\u003C\u002Fp>\n\nOn the tested AirPods, a session ends about 30 minutes after the lid closes. To\ncontinue, open and close the lid. See [Known limitations](#known-limitations).\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>The connect steps as a chart\u003C\u002Fstrong>\u003C\u002Fsummary>\n\n```mermaid\nflowchart TD\n    Start([\"Press Connect or fn ⌃\"]) --> Open[\"Open the lid\"]\n    Open --> Close[\"Close the lid\"]\n    Close --> Saved{\"Sensor offset\u003Cbr\u002F>saved?\"}\n    Saved -->|\"No\"| Hold[\"Set the case down\"]\n    Saved -->|\"Yes\"| Turn[\"Turn the case upright\"]\n    Hold --> Turn\n    Turn --> Edges{\"Screen edges\u003Cbr\u002F>saved?\"}\n    Edges -->|\"No\"| Dots[\"Point at three dots\"]\n    Edges -->|\"Yes\"| Pointing([\"Pointing\"])\n    Dots --> Pointing\n    Pointing -->|\"fn ⌃\"| Paused([\"Paused\"])\n    Paused -->|\"fn ⌃\"| Pointing\n```\n\n\u003C\u002Fdetails>\n\n## Known limitations\n\n**Sessions end about 30 minutes after the lid closes.** The app does not set this\nlimit. At that point motion stops, and the AirPods stay unreachable until you open\nthe lid. To continue, open and close the lid. In one test, reconnecting with the lid\nclosed did not reset the limit.\n\nThe likely cause is timer `0x63` in the earbud firmware. We found it by reading\n`rkof.bin` (H2, version 9A348), the firmware image for the tested AirPods Pro 3:\n\n| Address | What it does |\n|---|---|\n| `0x17d2a4` | Builds a status mask. It starts the timer if the mask is nonzero, the state check passes and the timer is not already running. It cancels the timer if the mask is zero. |\n| `0x17d326` | Loads the timer's length: 1,800,000 ms, or 30 minutes. |\n| `0x17d294` | The state check: the firmware's dock state equals 6. This probably means docked with the lid closed. |\n| `0x17cddc` | Runs when the timer ends. It checks the state again, then calls a fatal assert that does not return. |\n\nMeasured sessions ended at the same time, about 1,805 seconds after the lid closed.\nThis comes from reading the firmware and from those timings. No live capture has\nconfirmed it yet.\n\n## Troubleshooting\n\n| Problem | What to do |\n|---|---|\n| The app does not connect | Turn off Bluetooth on your iPhone. Your iPhone can hold the AirPods. |\n| \"Connecting\" does not end | Open the lid and keep it open until the app tells you to close it. |\n| The pointer lags or motion stops | Make sure no other app, such as OBS or a browser call, uses the AirPods as a microphone. |\n| The pointer stutters just after you connect | This is normal for about 20 seconds. |\n| \"Set it down\" takes a long time | Use a firm, flat surface and do not touch the case. |\n| Taps do not click | Go to Settings > Teach Tap. Do this again if you change how you hold the case. |\n\n## How it works\n\n```mermaid\nflowchart LR\n    subgraph AirPods[\"AirPods Pro in the closed case\"]\n        Sensors[\"Motion sensors\"]\n    end\n\n    subgraph Helpers[\"Helper programs\"]\n        Restore[\"ClosedCaseRestore\u003Cbr\u002F>brings the Bluetooth link up\"]\n        Motion[\"ClosedCaseMotion\u003Cbr\u002F>starts the sensors and\u003Cbr\u002F>keeps the case awake\"]\n    end\n\n    subgraph App[\"AirPointer app\"]\n        Session[\"ClosedCaseSession\u003Cbr\u002F>runs the session\"]\n        Math[\"Orientation.js\u003Cbr\u002F>motion to screen position\"]\n        Tap[\"ClosedCaseTap\u003Cbr\u002F>finds taps\"]\n        Guard[\"AudioOutputGuard\u003Cbr\u002F>keeps sound off the AirPods\"]\n        UI[\"Window, menu bar,\u003Cbr\u002F>notch and setup\"]\n    end\n\n    Mac[\"macOS\u003Cbr\u002F>moves the cursor and clicks\"]\n\n    Restore -->|\"checks the link\"| Sensors\n    Sensors -->|\"Bluetooth\"| Motion\n    Motion -->|\"motion data, through a pipe\"| Session\n    Session -->|\"heartbeat, every second\"| Motion\n    Session --> Math\n    Session --> Tap\n    Math -->|\"cursor position\"| Mac\n    Tap -->|\"click\"| Mac\n    Session --> Guard\n    UI \u003C-->|\"state and commands\"| Session\n```\n\n1. **Connect:** `ClosedCaseRestore` makes sure the AirPods' ordinary Bluetooth link\n   is up. `ClosedCaseMotion` then reconnects them once, because the motion channel\n   only answers just after a connection.\n2. **Stream:** `ClosedCaseMotion` starts the sensors and sends paced requests to\n   keep the closed case awake. It sends the motion data to the app.\n3. **Keep alive:** The app sends a heartbeat every second. If the app stops, the\n   helper stops the sensors and releases what it holds.\n4. **Point:** `Orientation.js` calculates the case's orientation and converts it to\n   a screen position.\n5. **Click:** `ClosedCaseTap` looks for a sudden movement in the direction of a tap.\n   If it finds one, the app clicks and plays a short sound on the Mac.\n\nIf motion stops for less than two seconds, the pointer stops and then continues.\nIf motion stops for longer, the pointer pauses and continues when motion returns.\n\n## Project layout\n\n```text\nSources\u002F\n  AirPointer\u002F          The app\n    App\u002F               Startup, the link to the windows, and the shortcut\n    Session\u002F           The session, motion math, taps, audio guard, cursor size\n    Interface\u002F         The window, menu bar, notch, setup and Tap Test\n    Checks\u002F            Window and pose checks; other checks sit beside their code\n  ClosedCaseMotion\u002F    The helper that talks to the AirPods\n  ClosedCaseRestore\u002F   The helper that brings the Bluetooth link up\nTests\u002F                 Recorded taps and handling for the tap check\nAssets\u002F                Images, sounds and the 3D case model\nScripts\u002F               Make the case and README images\nDocs\u002F                  The design system\nbuild.sh               Builds AirPointer.app and runs the checks\n```\n\n`Sources\u002FClosedCaseMotion\u002FCaseSustainedRenewal.m` lists the helper's exit codes at\nthe top. [Docs\u002FDESIGN-SYSTEM.md](Docs\u002FDESIGN-SYSTEM.md) has the rules for the\ninterface. [Assets\u002FREADME.md](Assets\u002FREADME.md) explains the images and sounds.\n\n## For developers\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Data on your Mac\u003C\u002Fstrong>\u003C\u002Fsummary>\n\nThe app keeps its data in `~\u002FLibrary\u002FApplication Support\u002FAirPointer\u002F`. It does not\nsend any of this anywhere.\n\n| File | Contents |\n|---|---|\n| `closed-case-target.txt` | The AirPods to use |\n| `closed-case-grip.json` | Saved screen edges |\n| `closed-case-sensor-calibration.json` | Saved sensor offset, kept for one week |\n| `PointerSessions\u002F` | Logs from the newest ten sessions |\n| `TapTests.jsonl` | Tap Test scores |\n\nDuring a session, the app's preferences also save which audio devices it moved.\nThe saved names include the AirPods' Bluetooth address.\n\nIn a session's `native.log`:\n\n- `STEP` lines show the time of each connection step.\n- `HOLD` lines show the motion count so far and its delay, about once a second.\n- `tap` lines explain each tap.\n- The `EXIT` line shows why the session ended.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Tap Test\u003C\u002Fstrong>\u003C\u002Fsummary>\n\nTaps are tuned on one person so far, so your score may differ.\n\nConnect, then go to **File > Developer > Tap Test**. The test takes about 75\nseconds and tells you when to tap.\n\nTo also save a session's raw motion, run this before you connect. The recording has\nno size limit. Expect roughly 20 MB for a 30-minute session.\n\n```sh\ndefaults write local.airpointer recordMotion -bool true\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Offline checks\u003C\u002Fstrong>\u003C\u002Fsummary>\n\nThese checks do not use Bluetooth. `--check-home` opens real windows, so run it on\na logged-in Mac.\n\n```sh\nAirPointer.app\u002FContents\u002FMacOS\u002FAirPointer --self-test\nAirPointer.app\u002FContents\u002FMacOS\u002FAirPointer --check-home\nAirPointer.app\u002FContents\u002FMacOS\u002FAirPointer --check-pointer-settings\nAirPointer.app\u002FContents\u002FMacOS\u002FAirPointer --check-closed-case-native\nAirPointer.app\u002FContents\u002FMacOS\u002FAirPointer --check-audio-output-policy\nAirPointer.app\u002FContents\u002FMacOS\u002FAirPointer --check-closed-case-tap Tests\u002FTapFixtures.csv\nAirPointer.app\u002FContents\u002FResources\u002FClosedCaseMotion.bin --self-test\n```\n\n\u003C\u002Fdetails>\n\n## Uninstall\n\nQuit AirPointer, delete this folder, then run:\n\n```sh\nrm -rf ~\u002FLibrary\u002FApplication\\ Support\u002FAirPointer\ndefaults delete local.airpointer\ntccutil reset Accessibility local.airpointer\ntccutil reset BluetoothAlways local.airpointer\n```\n\n## License\n\nThe code uses the [MIT License](LICENSE). The license does not cover `Assets\u002F`.\nApple owns the AirPods model that the case images are made from, and the sounds\nhave their own license. See [Assets\u002FLICENSE.md](Assets\u002FLICENSE.md).\n","AirPointer 是一款将 AirPods 充电盒变为 macOS 光标控制设备的工具应用。它通过读取 AirPods Pro（第2\u002F3代）充电盒内置的陀螺仪与加速度计数据，实现闭合状态下盒体姿态变化驱动鼠标移动，前盖轻触触发点击操作。项目基于 Swift 开发，依赖私有 macOS Accessibility API 实现光标控制，并采用静音音频流维持蓝牙连接稳定性。适用于临时替代鼠标、无障碍交互或演示场景，需配合已配对的 AirPods Pro 及 Apple Silicon Mac 使用。","2026-11-24 04:36:12","CREATED_QUERY"]