Git Product home page Git Product logo

jnativehook's Introduction

About

JNativeHook is a library to provide global keyboard and mouse listeners for Java. This will allow you to listen for global shortcuts or mouse motion that would otherwise be impossible using pure Java. To accomplish this task, JNativeHook leverages platform-dependent native code through Java's native interface to create low-level system-wide hooks and deliver those events to your application.

The following events are available via their respective listeners.

  • Key Press Events
  • Key Release Events
  • Key Typed Events
  • Mouse Down Events
  • Mouse Up Events
  • Mouse Click Events
  • Mouse Move Events
  • Mouse Drag Events
  • Mouse Wheel Events

In addition to global keyboard and mouse events, the following system properties are exposed by the native library. Please note that there is no guarantee that any of these properties will be available.

  • jnativehook.key.repeat.rate
  • jnativehook.key.repeat.delay
  • jnativehook.button.multiclick.iterval
  • jnativehook.pointer.sensitivity
  • jnativehook.pointer.acceleration.multiplier
  • jnativehook.pointer.acceleration.threshold

Download

Binary distribution for JNativeHook can be found at the releases section of the project page. Maven users can use the <groupId>com.1stleg</groupId> and <artifactId>jnativehook</artifactId> to include this library automatically. The nightly builds can be found at the maven snapshot repository.

Software and Hardware Requirements

  • Java 1.5 - 1.8
  • 256 MB of RAM
  • Apple OS X 10.5 - 10.10
    • i586, amd64
    • Enable Access for Assistive Devices
  • Windows 2000 - 10
    • i586, amd64
  • X11 Linux
    • i586, amd64, arm6j
    • libX11.so.6
    • libXt.so.6
    • libXtst.so.6
    • libXext.so.6
    • libXdmcp.so.6
    • libXau.so.6
    • libICE.so.6
    • libSM.so.6
    • libxcb.so.1
    • libc.so.6
    • libdl.so.2
    • libuuid.so.1
    • libXinerama.so.1

Donate

If you have found this library useful, please consider making a donation. Donate

Compiling Instructions

Detailed instructions to compile from source are available in the wiki.

Demo Applicaiton

The graphical example application was created to provided a real-time demonstration of raw output for all available native events. To run the application simply execute the jar file provided. Source code available at src/java/org/jnativehook/example/NativeHookDemo.java.

Example Code

Additional Information

Up to date source code and documentation available at: https://github.com/kwhat/jnativehook/

jnativehook's People

Contributors

dargonforce avatar kwhat avatar sogomn avatar spedwards avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.