https://github.com/kaiseiyokoyama/joyconkt
Utilized `hidapi` for JoyCon and Pro Controller without `GLFW`.
https://github.com/kaiseiyokoyama/joyconkt
game hidapi joycon kotlin
Last synced: 11 days ago
JSON representation
Utilized `hidapi` for JoyCon and Pro Controller without `GLFW`.
- Host: GitHub
- URL: https://github.com/kaiseiyokoyama/joyconkt
- Owner: KaiseiYokoyama
- Created: 2021-12-24T07:39:05.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-12-17T08:49:39.000Z (over 1 year ago)
- Last Synced: 2025-10-28T05:34:33.831Z (9 months ago)
- Topics: game, hidapi, joycon, kotlin
- Language: Kotlin
- Homepage:
- Size: 124 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# JoyConKt
Utilized `hidapi` for JoyCon and Pro Controller.
## `build.gradle.kts`
```kotlin
allprojects {
repositories {
maven("https://jitpack.io")
}
}
dependencies {
implementation("org.hid4java:hid4java:0.7.0")
implementation("com.github.KaiseiYokoyama:JoyConKt:v0.2.0")
}
```
## Unique Point
`JoyConKt` does not include `GLFW`.
`GLFW` is the famous library used for GUI framework.
It also provides gamepad support.
Some GUI framework include `GLFW` does not provide gamepad support.
A library for gamepad support is required in these case.
However, some gamepad libraries like [LWJGL](https://www.lwjgl.org/) include `GLFW`.
It causes the failure of `glfwInit()`.
`JoyConKt` does not include `GLFW` so that it can be used along with GUI frameworks.
## Features
- Detect connection and disconnection of controllers: `Manager`
- Receive input status includes IMU at 120 Hz or 60 Hz: `StandardFullMode`
- Rumble: `Controller.rumble()`, `Rumble`
- Set player LEDs: `Controller.setPlayerLights()`, `PlayerLight`
## Todo
- [ ] Receive input status when changes: `NormalMode`
- [ ] JoyCon support
- [ ] Dual JoyCon support
- [ ] Calibration support
- Sticks
- IMU
## Reference
- [dekuNukem/Nintendo_Switch_Reverse_Engineering](https://github.com/dekuNukem/Nintendo_Switch_Reverse_Engineering)
- [KaiseiYokoyama/joycon-rs](https://github.com/KaiseiYokoyama/joycon-rs)