Input support

This topic covers design considerations and best practices for handling user input in Google Play Games on PC.

Google Play Games on PC relies on a mouse and keyboard for player input rather than a touchscreen. When designing your mouse and keyboard experience, focus on building the best user experience for desktop or laptop PC users. To get started, see our guide on Android app input compatibility for Chromebooks.

Best practices

We recommend the following best practices for designing and building player interactions.

  • All targets should be clickable with a mouse.
  • All scrollable surfaces scroll on mouse wheel events.
  • Highlight clickable surfaces when hovered, and use your best judgment to improve UI discovery without overwhelming the user.
  • Provide hotkeys for users to quickly bring up controls.
  • Replace touch-based controls (for example, thumb joysticks or on-screen buttons) with mouse-based controls and hotkeys.
  • For actions in your mobile game that require multi-touch gestures, ensure the same actions are supported with a keyboard or mouse control (for example, using the scroll wheel of the mouse to replace a two-finger pinch).

For additional details and best practices, see our guide on optimizing your ChromeOS Android app for mouse and keyboard.

The following list includes actions many games have in common, and the typical implementation developers use on Google Play Games on PC:

  • Use the enter key to send messages or submit text in text entry fields.
  • Menus and dialogs should be cancellable with the escape key.
  • Use the enter key to progress through story elements and dialog boxes.
  • Use the scroll wheel to scroll text vertically.
  • Use the scroll wheel to zoom in or out, especially if you use a two-finger pinch in your mobile build.
  • Use W, A, S, and D navigate around a map that you'd normally use a click and drag motion on.

Even though these actions are common, you should still explicitly present them to the player with the Input SDK to make sure they're properly discoverable.

Compatibility mode

Google Play Games on PC places your game into "input compatibility mode" by default. This means that when you press the left mouse button, your game is given a touch event. See the mouse input guide for more information.

Tutorials and user education

In some cases, users can benefit from in-game tutorials that teach them the controls to the game, in addition to being able to view the mouse and keyboard controls. We recommend including in-game tutorials and educational features with the correct controls for mouse and keyboard, and removing tutorials relevant to touch-based controls for the PC version of your game.