Game Controller Support
Overview¶
The UI provided by Hive SDK allows you to move the mouse cursor and click buttons with a 'game controller' instead of a regular mouse. For example, in the webview area exposed by Hive SDK, users can move the mouse cursor with a game controller and click buttons within the webview area.
Note
'Game controller' support in Hive SDK is provided starting from Hive SDK v4 Unity Windows 24.1.0.
Supported game controller¶
The types of game controllers supported by Hive SDK are as follows, and the maximum number of controllers that can be used per SDK is 1.
- Microsoft Xbox Controller
- Sony PlayStation DualSense, DualShock Controller
- Nintendo Switch Pro Controller
Controller key mapping¶
Starting with Hive SDK v4 Unity Windows 25.0.0, some Hive UI support Controller Key Mapping when using a game controller.
Warning
Please note that in UIs that support controller key mapping, the key operation method is different from the key operation method in the existing UI.
Key operation method¶
Input device | Existing UI key operation method | UI key operation method with controller key mapping support |
Left analog joystick | Move mouse cursor | Move focus |
Right analog joystick | Mouse vertical and horizontal wheel scroll | Mouse vertical and horizontal wheel scroll |
A Button | Left mouse button click | Confirm (X button for DualSense, DualShock) |
B button | Not supported | Cancel (O button for DualSense, DualShock) |
D-pad | Not supported | Move focus |
List of UIs supporting controller key mapping¶
Here is a list of Hive UIs that support the controller key mapping function:
Support UI | |
1 | App Update |
2 | Access Restriction |
3 | Server Maintenance |
4 | Login Waiting |
5 | IdP List |
6 | Promotion |
7 | Google Payment Account Verification |
8 | Payment Confirmation |
9 | Payment Error |
10 | Steam Deck Login |
Warning
The controller key mapping function cannot be used in Webview screens.
Precautions¶
When applying 'Game Controller' to Hive SDK, the following must be kept in mind.
Game controller operational scope¶
The game controller is supported only within the UI implemented by the Hive SDK. For example, this includes the login screen, news, and promotional banners, and other webview UIs that the game pops up using Hive SDK. It is not supported in UIs not implemented by Hive SDK, such as external browser windows. Movement of the mouse cursor using the game controller within the game must be implemented by the developer directly.
Steam integration¶
When "Use Steam Input" is set during Steam integration, the game controller functionality provided by Hive SDK cannot be used. However, through the layout change menu provided by Steam, an environment similar to the game controller functionality offered by Hive SDK can be provided. For more details, refer to the Steam Input page in the official Steamworks documentation.
Processing controller input in the existing way¶
If a game controller input (including the Steam Deck's own controller) occurs before the app receives a response after calling a Hive SDK method, the app should not handle the game controller input on its own. Game controller inputs occurring within the UI implemented by Hive SDK are handled by Hive SDK.
Windows on-screen keyboard¶
When using the game controller support feature provided by Hive SDK with the Windows on-screen keyboard, the following settings need to be made in the "Options" of the Windows on-screen keyboard to use the game controller feature:
- Check Scan and Enter
- Check Use Joystick, Gamepad, or Other Gaming Device
Known issues¶
If you repeatedly and quickly reconnect a game controller, the controller may behave abnormally. For example, in the case of the Switch Pro Controller, if you repeatedly disconnect and connect within a short period of time, the mouse cursor may move in a certain direction without the user's operation. This is a Switch Pro Controller issue, and if the issue occurs, you can resolve it by pressing the sync button located on the left side of the wired connection terminal.