Skip to content

An intro guide on how to use JNativeHook to listen for keyboard and mouse events.

Notifications You must be signed in to change notification settings

Lefro1/IntroToJNativeHook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage

About The Project

I was trying to learn JNativeHook and didn't find many great guides out there going from simple implementation to full-blown working project.

The official documentation for the "areas" of use found https://github.com/kwhat/jnativehook/tree/2.2/doc is more than enough for most people, but I like to learn through examples.

The unofficial javadoc can be found here https://javadoc.io/doc/com.1stleg/jnativehook/latest/index.html

There are two folders found in the project /src/ director. The "Introduction" folder will go into the ideas behind this library we are using. The "ExampleProjects" folder will try to give some simple examples of implementation of the JNativeHook library.

(back to top)

Built With

All of this will be coded in Java 17 and it is using the most up to date release of JNativeHook as of May-19-2022.

This project has a /libs/ folder with jnativehook-2.2.2.jar existing within it. Other information or other releases can be found on the GitHub page for JNativeHook.

(back to top)

Getting Started

Follow these instructions if you want to use this app.

Prerequisites

(This onely applies if not using the jar file)

This application relies on JNativeHook 2.2.2 or newer.

  • If you want to use a different version of JNativeHook, they can be found here. Download the relevant jar file.

Installation

This will be confirmed working on Windows machines using IntelliJ (what it's being developed from).

  • Run git clone https://github.com/jasdrive/JavaFX_GUI_AutoClicker.git
  • Open the src folder in IntelliJ.
  • On IntelliJ, go file -> Project Structure -> Modules -> Dependencies.
  • Directly beneath "Module SDK" select the + icon and find your JNativeHook.jar file.
    • Should be found in \IntroToJNativeHook\libs
  • Add the file to the dependency list, apply and close.
  • You can now compile src/GUI/RenderGUI's main method which will run the program.

(back to top)

Usage

This is just meant to be an educational document that will potentially help others learn the basics of JNativeHook.

Use it however you see fit, feel free to open issues or submit requests.

(back to top)

About

An intro guide on how to use JNativeHook to listen for keyboard and mouse events.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages