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

Project Activity

See All Activity >

License

Public Domain

Follow JPointerLock

JPointerLock Web Site

nel_h2
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of JPointerLock!

Additional Project Details

Operating Systems

Linux, Windows

Intended Audience

Developers

User Interface

Java AWT, Java Swing

Programming Language

C, Java

Related Categories

C User Interface (UI) Software, C Usability Software, Java User Interface (UI) Software, Java Usability Software

Registered

2020-11-26