Upgrade Input SDK for Java and Kotlin to version 1.1
Stay organized with collections
Save and categorize content based on your preferences.
This guide explains how to upgrade your game from the 1.0.0-beta
Input SDK for Java and Kotlin to 1.1.1-beta. See the
Unity upgrade guide for Unity
specific instructions.
Release Notes
Google Play Games on PC supports remapping of keyboard controls based
on the key bindings your game provides using the Input SDK.
Users access this feature by opening
the overlay, selecting controls,
and then clicking on the action they wish to remap.
Google Play Games on PC maps every user-remapped input onto your game's default
input. This way your game doesn't have to be aware of the player's remapping. If
you need to know the new input for an in-game action, such as displaying the
keyboard controls in your game, you may optionally register a callback to be
notified for remapping events.
Google Play Games on PC stores each user's remapped controls locally so they
are persistent across gaming sessions. Since this is stored locally, it does not
influence the mobile experience and is deleted upon uninstallation of Google Play Games on PC. Control settings are not persisted across multiple
PC devices.
You don't need to upgrade the Input SDK to enable key remapping in
your game, but remapping can be disabled for your game if an
unsupported configuration is detected.
If you want to control the input remapping experience, or if the remapping
feature is disabled for your game, perform the following steps to resolve:
Update your InputMap to set the remapping feature enabled.
If you want to opt-out of the remapping feature for your game while still
displaying the read-only version of your key bindings, follow these steps:
Upgrade to Input SDK 1.1.1-beta.
Update your InputMap to set the remapping feature to disabled.
You can upgrade your version of the Input SDK to
1.1.1-beta to take advantage of advanced remapping features
in Google Play Games on PC by using InputContexts to define controls for
different scenes of your game, add callbacks to listen for remapping events,
define a set of reserved keys that the user cannot remap to, and deactivate the
remapping feature per InputAction, InputGroup or InputMap.
Consider the following exceptions while upgrading to the new SDK version:
Unsupported configurations
Input remapping is disabled if the following conditions are not met:
An InputAction utilizing multiple keys must be composed of a modifier
and non-modifier key. For example, Shift + A is valid but A +
B, Ctrl + Alt, and Shift + A + Tab are not.
Two or more InputAction or InputGroup objects cannot share the same
unique ID.
Upgrade
Input SDK 1.1.1-beta is backward compatible with Input SDK
1.0.0-beta. Games using previous implementations of the Input SDK
still support basic remapping, unless they use an
unsupported configuration. If your game is using an
earlier version of the Input SDK, consider reading the
upgrade guide from 0.0.4 to 1.0.0-beta.
Upgrading to 1.1.1-beta enables new features including:
For version 1.1.1-beta it is a good practice to define your
InputAction, InputGroup, InputContext and InputMap objects as static
fields of your InputMappingProvider class since these fields are accessible
from other parts of your application:
The InputAction.create() method of Input SDK 1.0.0-beta is
deprecated. An InputAction now has a version identifier and can be marked as
remappable or not. An InputAction defined using the Input SDK
1.0.0-betacreate() method is remappable by default and lacks versioning
information:
companionobject{privatevalmoveUpInputAction=InputAction.create("Move Up",InputActionsIds.DRIVE.ordinal.toLong(),InputControls.create(listOf(KeyEvent.KEYCODE_W),emptyList()),InputEnums.REMAP_OPTION_ENABLED)// This action is remappable}
Java
privatestaticfinalInputActionmoveUpInputAction=InputAction.create("Move Up",InputEventIds.MOVE_UP.ordinal(),InputControls.create(Collections.singletonList(KeyEvent.KEYCODE_W),Collections.emptyList()),InputEnums.REMAP_OPTION_ENABLED// this action is remappable);
InputAction in Input SDK 1.1.1-beta (with version string)
privatestaticfinalInputActionmoveUpInputAction=InputAction.create("Move Up",InputControls.create(Collections.singletonList(KeyEvent.KEYCODE_W),Collections.emptyList()),InputIdentifier.create(INPUTMAP_VERSION,InputEventIds.MOVE_UP.ordinal()),InputEnums.REMAP_OPTION_ENABLED// this action is remappable);
For more information about versioning your key bindings, see
Tracking key IDs.
Update your InputGroups
In Input SDK 1.1.1-beta you need to uniquely
identify each InputGroup. Each InputAction belongs to an InputGroup -- a
collection of related actions. This improves navigation and discoverability of
the controls during gameplay. In the same way that InputAction must have a
unique identifier among all the actions in a single InputContext, an
InputGroup must have a unique ID across the existing groups.
For the examples in this section, a game has two InputContext objects
representing the main menu and gameplay. Appropriate IDs are tracked for each
InputGroup in these contexts using the following enumeration:
Kotlin
enumclassInputGroupsIds{// Main menu sceneBASIC_NAVIGATION,// WASD, Enter, BackspaceMENU_ACTIONS,// C: chat, Space: quick game, S: store// Gameplay sceneBASIC_MOVEMENT,// WASD, space: jump, Shift: runMOUSE_ACTIONS,// Left click: shoot, Right click: aimEMOJIS,// Emojis with keys 1,2,3,4 and 5GAME_ACTIONS,// M: map, P: pause, R: reload}
Java
publicenumInputGroupsIds{// Main menu sceneBASIC_NAVIGATION,// WASD, Enter, BackspaceMENU_ACTIONS,// C: chat, Space: quick game, S: store// Gameplay sceneBASIC_MOVEMENT,// WASD, space: jump, Shift: runMOUSE_ACTIONS,// Left click: shoot, Right click: aimEMOJIS,// Emojis with keys 1,2,3,4 and 5GAME_ACTIONS,// M: map, P: pause, R: reload}
Like InputAction, the InputGroup.create() method of the Input SDK
1.0.0-beta has been deprecated. You must update your InputGroup in your game
with a version identifier and boolean indicating whether the InputAction
objects in your groups are remappable. Groups created with the deprecated Input SDK 1.0.0-betacreate() method are remappable, have the ID 0,
and the version ID is an empty string (""):
companionobject{privatevalmovementInputGroup=InputGroup.create("Basic movement",listOf(moveUpInputAction,moveLeftInputAction,moveDownInputAction,moveRightInputAction,jumpInputAction,runInputAction),InputGroupsIds.BASIC_MOVEMENT.ordinal.toLong(),// All the actions in this groups can't be remappedInputEnums.REMAP_OPTION_DISABLED)}
Java
privatestaticfinalInputGroupmovementInputGroup=InputGroup.create("Basic movement",Arrays.asList(moveUpInputAction,moveLeftInputAction,moveDownInputAction,moveRightInputAction,jumpInputAction,runInputAction),InputGroupsIds.BASIC_MOVEMENT.ordinal(),// All the actions in this groups can't be remappedInputEnums.REMAP_OPTION_DISABLED);
InputGroup in Input SDK 1.1.1-beta (with version string)
Kotlin
companionobject{privatevalmovementInputGroup=InputGroup.create("Basic movement",listOf(moveUpInputAction,moveLeftInputAction,moveDownInputAction,moveRightInputAction,jumpInputAction,runInputAction),InputIdentifier.create(INPUTMAP_VERSION,InputGroupsIds.BASIC_MOVEMENT.ordinal.toLong()),// All the actions in this groups can't be remappedInputEnums.REMAP_OPTION_DISABLED)}
Java
privatestaticfinalInputGroupmovementInputGroup=InputGroup.create("Basic movement",Arrays.asList(moveUpInputAction,moveLeftInputAction,moveDownInputAction,moveRightInputAction,jumpInputAction,runInputAction),InputIdentifier.create(INPUTMAP_VERSION,InputGroupsIds.BASIC_MOVEMENT.ordinal()),// All the actions in this groups can't be remappedInputEnums.REMAP_OPTION_DISABLED);
For more information about versioning your key bindings, see
Tracking key IDs.
Update your InputMap
InputMap.create() method of Input SDK 1.0.0-beta is
deprecated. Update your InputMap to assign a version identifier, opt out
completely from the remapping feature or assign a list of reserved keys for your
game that you don’t want to be used for remapping by the user. Every InputMap
defined using the Input SDK 1.0.0-betacreate() method is
remappable by default, is identified with the ID 0, and doesn’t have any
reserved keys.
companionobject{constvalINPUTMAP_VERSION="1.0.0"constvalINPUT_MAP_ID=0valgameInputMap=InputMap.create(listOf(movementInputGroup,mouseMovementInputGroup),MouseSettings.create(true,false),InputIdentifier.create(INPUTMAP_VERSION,INPUT_MAP_ID.toLong()),InputEnums.REMAP_OPTION_ENABLED,// Use ESCAPE as reserved keylistof(InputControls.create(listOf(KeyEvent.KEYCODE_ESCAPE),emptyList())))}
Java
publicstaticfinalStringINPUT_MAP_VERSION="1.0.0-beta";publicstaticfinallongINPUT_MAP_ID=0;publicstaticfinalInputMapgameInputMap=InputMap.create(Arrays.asList(movementInputGroup,mouseMovementInputGroup),MouseSettings.create(true,false),InputIdentifier.create(INPUTMAP_VERSION,INPUT_MAP_ID),InputEnums.REMAP_OPTION_ENABLED,// Use ESC key as reserved keyArrays.asList(InputControls.create(Collections.singletonList(KeyEvent.KEYCODE_ESCAPE),Collections.emptyList())));
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2026-06-09 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-06-09 UTC."],[],[]]