{"id":48946764,"url":"https://github.com/andrestubbe/faststylus","last_synced_at":"2026-04-17T17:06:59.546Z","repository":{"id":351785302,"uuid":"1212397932","full_name":"andrestubbe/FastStylus","owner":"andrestubbe","description":"Native stylus/pen input for Java — Pressure, tilt, eraser, barrel buttons via Windows Pointer API. Hardware-accelerated JNI. Tested with Surface Pen \u0026 Wacom Bamboo Ink Plus.","archived":false,"fork":false,"pushed_at":"2026-04-16T12:36:51.000Z","size":32,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-16T14:29:41.250Z","etag":null,"topics":["eraser","fastjava","input","java","jitpack","jni","native","pen","pressure","stylus","surface","tablet","tilt","wacom","windows"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andrestubbe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-16T10:40:01.000Z","updated_at":"2026-04-16T12:36:54.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/andrestubbe/FastStylus","commit_stats":null,"previous_names":["andrestubbe/faststylus"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/andrestubbe/FastStylus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrestubbe%2FFastStylus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrestubbe%2FFastStylus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrestubbe%2FFastStylus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrestubbe%2FFastStylus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andrestubbe","download_url":"https://codeload.github.com/andrestubbe/FastStylus/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrestubbe%2FFastStylus/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31937752,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-17T12:37:54.787Z","status":"ssl_error","status_checked_at":"2026-04-17T12:37:25.095Z","response_time":62,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["eraser","fastjava","input","java","jitpack","jni","native","pen","pressure","stylus","surface","tablet","tilt","wacom","windows"],"created_at":"2026-04-17T17:06:55.414Z","updated_at":"2026-04-17T17:06:59.540Z","avatar_url":"https://github.com/andrestubbe.png","language":"C++","readme":"# FastStylus — Native Stylus/Pen Input for Java [alpha]\n\n**⚡ Ultra-fast native stylus input for Java — Pressure, tilt, eraser, and hover impossible in pure Java**\n\n[![Release](https://img.shields.io/badge/release-v1.0.0-blue.svg)]()\n[![JitPack](https://img.shields.io/badge/JitPack-available-brightgreen.svg)](https://jitpack.io/#andrestubbe/FastStylus)\n[![Java](https://img.shields.io/badge/Java-17+-blue.svg)](https://www.java.com)\n[![Platform](https://img.shields.io/badge/Platform-Windows%2010+-lightgrey.svg)]()\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n\u003e **Native stylus/pen input** via Windows WM_POINTER API. Powered by FastCore.\n\nFastStylus provides **hardware-level stylus access** for Java applications — something impossible with standard AWT/Swing. Get raw pen data including:\n\n- **Pressure sensitivity** — 0-1024 levels (0-100% mapped)\n- **Tilt X/Y** — Pen angle in degrees (-90° to +90°)\n- **Rotation/Orientation** — 0-360°\n- **Eraser detection** — Automatic eraser tip recognition\n- **Barrel buttons** — Two side button support\n- **Hover** — Proximity detection without contact\n- **Low latency** — Native Windows API, no JVM event queue delays\n\n**Java CANNOT do this.** AWT only provides mouse emulation for pen input. FastStylus gives you the real thing — perfect for Surface Pro, Wacom, and other Windows Ink devices.\n\n---\n\n## 📦 Why FastStylus?\n\n| Feature | Java AWT/Swing | FastStylus (JNI) |\n|---------|---------------|-----------------|\n| Pressure | ❌ No | ✅ 0-1024 levels (0-100%) |\n| Tilt X/Y | ❌ No | ✅ -90° to +90° |\n| Rotation | ❌ No | ✅ 0-360° |\n| Eraser Detection | ❌ No | ✅ Automatic |\n| Barrel Buttons | ❌ No | ✅ 2 buttons |\n| Hover | ❌ No | ✅ Proximity detection |\n| Raw Pen Events | ❌ No (synthesized mouse) | ✅ Native WM_POINTER |\n| Latency | High (event queue) | **Native speed** |\n\n---\n\n## 🚀 Quick Start\n\n```java\nimport faststylus.FastStylus;\nimport faststylus.FastStylus.StylusEvent;\n\nimport javax.swing.JFrame;\n\npublic class StylusDemo {\n    public static void main(String[] args) {\n        JFrame frame = new JFrame(\"FastStylus Demo\");\n        frame.setSize(800, 600);\n        frame.setVisible(true);\n        \n        // Initialize native stylus input\n        FastStylus stylus = FastStylus.create(frame);\n        \n        // Add stylus listener\n        stylus.addListener(event -\u003e {\n            System.out.println(\"Stylus \" + event.id + \n                \" at (\" + event.x + \",\" + event.y + \")\" +\n                \" pressure=\" + event.pressurePercent + \"%\" +\n                \" tilt=(\" + event.tiltX + \",\" + event.tiltY + \")\" +\n                \" eraser=\" + event.isEraser +\n                \" state=\" + event.state);\n        });\n        \n        // Start polling\n        stylus.start();\n        \n        // Your app runs here...\n    }\n}\n```\n\n---\n\n## 📦 Installation\n\n### Maven (JitPack)\n\n```xml\n\u003crepositories\u003e\n    \u003crepository\u003e\n        \u003cid\u003ejitpack.io\u003c/id\u003e\n        \u003curl\u003ehttps://jitpack.io\u003c/url\u003e\n    \u003c/repository\u003e\n\u003c/repositories\u003e\n\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.andrestubbe\u003c/groupId\u003e\n    \u003cartifactId\u003efaststylus\u003c/artifactId\u003e\n    \u003cversion\u003e1.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### Gradle (JitPack)\n\n```groovy\nrepositories {\n    maven { url 'https://jitpack.io' }\n}\ndependencies {\n    implementation 'com.github.andrestubbe:faststylus:1.0.0'\n}\n```\n\n### Direct Download\n\n- [faststylus-v1.0.0.jar](https://github.com/andrestubbe/FastStylus/releases/download/v1.0.0/faststylus-v1.0.0.jar) — Main library with DLL\n- [fastcore-v1.0.0.jar](https://github.com/andrestubbe/FastCore/releases/download/v1.0.0/fastcore-1.0.0.jar) — JNI loader (required dependency)\n\n```bash\n# Run with both JARs\njava -cp \"faststylus-v1.0.0.jar;fastcore-1.0.0.jar\" YourApp\n```\n\n### Build from Source\n\nSee [COMPILE.md](COMPILE.md) for detailed build instructions.\n\n---\n\n## 🎯 API Reference\n\n### Core Methods\n\n| Method | Description | Status |\n|--------|-------------|--------|\n| `FastStylus.create(window)` | Initialize stylus for window | ✅ Working |\n| `addListener(listener)` | Add stylus event callback | ✅ Working |\n| `start()` | Begin stylus polling | ✅ Working |\n| `stop()` | Stop stylus polling | ✅ Working |\n| `isStylusAvailable()` | Check if stylus present | ✅ Working |\n| `getMaxStylusPoints()` | Get max simultaneous pens | ✅ Working |\n\n### StylusEvent Fields\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `id` | int | Pointer ID (tracking) |\n| `x, y` | int | Screen coordinates |\n| `pressure` | int | 0-1024 raw pressure |\n| `pressurePercent` | int | 0-100% mapped pressure |\n| `tiltX` | int | X tilt angle (-90° to +90°) |\n| `tiltY` | int | Y tilt angle (-90° to +90°) |\n| `rotation` | int | Rotation 0-360° |\n| `width, height` | int | Contact size in pixels |\n| `state` | State | HOVER / DOWN / MOVE / UP |\n| `isEraser` | boolean | Eraser tip active |\n| `isBarrelButton1` | boolean | Barrel button 1 pressed |\n| `isBarrelButton2` | boolean | Barrel button 2 pressed |\n| `isInverted` | boolean | Pen inverted (eraser end) |\n| `timestamp` | long | Event time in ms |\n\n---\n\n## 🏗️ Build from Source\n\n### Prerequisites\n- Windows 10/11 with Stylus/Tablet support\n- Java JDK 17+\n- Visual Studio 2022 (C++ workload)\n\n### Build\n```batch\ncompile.bat\nmvn clean package\n```\n\nSee [COMPILE.md](COMPILE.md) for detailed instructions.\n\n---\n\n## 📄 License\n\nMIT License — See [LICENSE](LICENSE) for details.\n\n---\n\n## Project Structure\n\n```\nfaststylus/\n├── .github/workflows/          # CI/CD\n├── examples/00-basic-usage/   # Demo project\n│   ├── pom.xml\n│   └── src/main/java/faststylus/StylusDemo.java\n├── native/\n│   ├── FastStylus.cpp         # Native implementation\n│   └── FastStylus.def         # JNI exports (REQUIRED)\n├── src/main/java/faststylus/  # Library source\n│   └── FastStylus.java\n├── compile.bat                # Native build script\n├── COMPILE.md                 # Build instructions\n├── pom.xml                    # Maven config\n└── README.md                  # This file\n```\n\n---\n\n## 🖊️ Compatible Devices\n\n- **Microsoft Surface** Pro 8/9, Studio, Go, Laptop (with Surface Pen)\n- **Wacom** Penabled, AES, and EMR devices\n- **Windows Ink** compatible pens\n- **HP, Dell, Lenovo** 2-in-1 devices with active pens\n\n### ✅ Tested Devices\n\n| Device | Pen | Pressure | Tilt | Eraser | Barrel | Status |\n|--------|-----|----------|------|--------|--------|--------|\n| Surface Pro 8 | **Wacom Bamboo Ink Plus** | ✅ 0-1024 | ✅ ±90° | ✅ | ✅ 2 buttons | ✅ **Verified Apr 2026** |\n\n\u003e **We need your help!** If you test FastStylus with your device, please [open an issue](https://github.com/andrestubbe/FastStylus/issues) with your results and we'll add it to the compatibility list.\n\n### 🙋 Call for Volunteers\n\nFastStylus needs testing on more hardware! If you have:\n- A Windows tablet/laptop with stylus support\n- Any active pen (Wacom, Surface, HP, Dell, Lenovo, etc.)\n- 5 minutes to run the demo\n\nPlease test and report:\n1. Does pressure work? (0-100% in HUD)\n2. Does tilt work? (X/Y degrees when angling pen)\n3. Does eraser work? (flip pen, HUD shows \"ERASER\")\n4. Do barrel buttons work? (HUD shows \"BTN1/BTN2\")\n\n[Submit your test results →](https://github.com/andrestubbe/FastStylus/issues/new)\n\n---\n\n**FastStylus** — *Part of the FastJava Ecosystem*  \n- [FastCore](https://github.com/andrestubbe/FastCore) — JNI loader\n- [FastTouch](https://github.com/andrestubbe/FastTouch) — Touch input\n- More at [github.com/andrestubbe](https://github.com/andrestubbe)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrestubbe%2Ffaststylus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrestubbe%2Ffaststylus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrestubbe%2Ffaststylus/lists"}