Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?


Failed to load latest commit information.
Latest commit message
Commit time

🎮️ Game Controller Extension for libGDX, Version 2

Use game controllers with ease in your libGDX games.

📖️ Documentation - 🎁️ Feature overview - Compatibility

🚀️ Migration guide from v1

💾️ Installation

The recommended way to use gdx-controllers is via dependency management with Gradle or Maven. Artifacts are available in Snapshot Repository and Maven Central.

Sonatype Nexus (Releases) Sonatype Nexus (Snapshots)


ext {
    gdxControllersVersion = '2.0.1' // see badges above for latest versions

Add the following dependencies:


implementation "com.badlogicgames.gdx-controllers:gdx-controllers-core:$gdxControllersVersion"


implementation "com.badlogicgames.gdx-controllers:gdx-controllers-desktop:$gdxControllersVersion"

This will automatically fetch the underlying SDL-based natives and Java wrappers. If you want to use a newer version, add the dependency yourself:

implementation("com.badlogicgames.jamepad:jamepad:$jamepadVersion") {
    exclude group: 'com.badlogicgames.gdx', module: 'gdx-jnigen-loader'

Make sure to check the compatibility doc when doing so.


implementation "com.badlogicgames.gdx-controllers:gdx-controllers-android:$gdxControllersVersion"

Proguard setting:

-keep class { *; }


implementation "com.badlogicgames.gdx-controllers:gdx-controllers-ios:$gdxControllersVersion"

robovml.xml needs the following lines added to forceLinkClasses and frameworks:


If you forget to explicitly link the framework, no game controller will show up.


implementation "com.badlogicgames.gdx-controllers:gdx-controllers-core:$gdxControllersVersion:sources"
implementation "com.badlogicgames.gdx-controllers:gdx-controllers-gwt:$gdxControllersVersion:sources"

You also need to add the following file to your GdxDefinition.gwt.xml in your html project:

<inherits name="com.badlogic.gdx.controllers" />
<inherits name="com.badlogic.gdx.controllers.controllers-gwt"/>

Building from source

To build from source, clone or download this repository, then open it in Android Studio. Perform the following command to compile and upload the library in your local repository:

gradlew clean uploadArchives -PLOCAL=true

See build.gradle file for current version to use in your dependencies.

🤝️ News & Community

You can get help on the libgdx discord.


The project is licensed under the Apache 2 License, meaning you can use it free of charge, without strings attached in commercial and non-commercial projects. We love to get (non-mandatory) credit in case you release a game or app using this project!