Skip to content

JIntellitype is a Java API for interacting with Microsoft Intellitype commands as well as registering for Global Hotkeys in your Java application.

License

Notifications You must be signed in to change notification settings

melloware/jintellitype

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JIntellitype

Maven Javadocs License

JIntellitype is a Java JNI library that provides an interface to Microsoft Intellitype keyboard commands and global hotkey registration in Windows applications. The library enables Java applications to respond to special media keys (Play, Pause, Stop, etc.) and register global hotkey combinations.

Important

This library is Windows-only as it uses Windows-specific API calls.

If you like this project, please consider supporting me ❤️

GitHub Sponsor PayPal

Table of Contents

Features

  • Register global hotkey combinations that work system-wide in Windows
  • Receive notifications for special media keys (Play, Pause, Stop, Next, Previous)
  • Support for modifier keys (CTRL, ALT, SHIFT, WIN) in hotkey combinations
  • Automatic DLL management (32/64 bit)
  • Simple and intuitive API
  • Thread-safe implementation
  • Comprehensive error handling

Installation

Maven

<dependency>
    <groupId>com.melloware</groupId>
    <artifactId>jintellitype</artifactId>
    <version>[VERSION]</version>
</dependency>

Gradle

implementation 'com.melloware:jintellitype:[VERSION]'

The native DLLs are automatically extracted and loaded at runtime. No manual installation steps are required.

Usage

Basic Setup

// Initialize JIntellitype
JIntellitype.getInstance().addHotKeyListener(identifier -> {
    System.out.println("Hotkey pressed: " + identifier);
});

JIntellitype.getInstance().addIntellitypeListener(command -> {
    System.out.println("Intellitype command: " + command);
});

// Register hotkeys
JIntellitype.getInstance().registerHotKey(1, JIntellitype.MOD_WIN, 'A');  // Windows + A
JIntellitype.getInstance().registerHotKey(2, JIntellitype.MOD_ALT + JIntellitype.MOD_SHIFT, 'B');  // Alt + Shift + B

// Clean up on exit
Runtime.getRuntime().addShutdownHook(new Thread(() -> {
    JIntellitype.getInstance().cleanUp();
}));

Supported Modifier Keys

  • JIntellitype.MOD_ALT - Alt key
  • JIntellitype.MOD_CONTROL - Control key
  • JIntellitype.MOD_SHIFT - Shift key
  • JIntellitype.MOD_WIN - Windows key

Supported Media Commands

  • APPCOMMAND_MEDIA_PLAY_PAUSE - Play/Pause
  • APPCOMMAND_MEDIA_STOP - Stop
  • APPCOMMAND_MEDIA_NEXTTRACK - Next Track
  • APPCOMMAND_MEDIA_PREVIOUSTRACK - Previous Track
  • APPCOMMAND_VOLUME_MUTE - Mute
  • APPCOMMAND_VOLUME_UP - Volume Up
  • APPCOMMAND_VOLUME_DOWN - Volume Down

Examples

See the JIntellitypeDemo class for a complete working example.

Building from Source

Prerequisites

  • Java JDK 8 or higher
  • Apache Maven
  • Visual Studio C++ (for native code compilation)

Build Steps

  1. Clone the repository
git clone https://github.com/melloware/jintellitype.git
  1. Build with Maven
mvn clean package

Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Support

About

JIntellitype is a Java API for interacting with Microsoft Intellitype commands as well as registering for Global Hotkeys in your Java application.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project