Adds support for confining the mouse pointer to a Java AWT or Swing window, useful for video games that use mouse look or edge scrolling.
Usage:
0. Download release/jpointerlock.jar and lib/native-library-loader.jar from the code section, and add them to your build path/classpath.
1. Call PointerLockLoader.init() as early as possible on the AWT EDT to load the native library.
2. Call PointerLock.setPointerLock(Window, boolean) on the AWT EDT when you want to lock or unlock the pointer.
This library and the included native library loader are released under the Unlicense and come with absolutely no warranty. See https://unlicense.org/ for more information.
Features
- Windows support using ClipCursor
- Linux support using XGrabPointer
- Binaries for x86 and amd64 architectures
- Very simple API
- Public domain
License
Public DomainFollow JPointerLock
Other Useful Business Software
Zenflow- The AI Workflow Engine for Software Devs
Zenflow is the AI workflow engine built for real teams. Parallel agents plan, code, test, and verify in one workflow. With spec-driven development and deep context, Zenflow turns requirements into production-ready output so teams ship faster and stay in flow.
Rate This Project
Login To Rate This Project
User Reviews
Be the first to post a review of JPointerLock!