Game Controller Support
Game Controller¶
From Hive SDK v4 Unity Windows 24.1.0, users can move the mouse cursor and click buttons using a game controller within the UI implemented by the Hive SDK. For example, in the webview area exposed by the Hive SDK, users can move the mouse cursor with a game controller to click buttons within the webview area.
Supported Range¶
The game controllers supported by Hive SDK are as follows:
- Microsoft Xbox Controller
- Sony PlayStation DualSense, DualShock Controller
- Nintendo Switch Pro Controller
The maximum number of game controllers supported by Hive SDK is one.
Key Operation Method¶
- Moving the mouse cursor: Analog joystick (left)
- Mouse vertical/horizontal wheel scroll: Analog joystick (right)
- Left mouse button click: A button (for DualSense, DualPro X button)
- Right mouse button click: Not supported
Precautions¶
When developing with Hive SDK, the following should be noted when using the game controller feature.
Game Controller Operational Range¶
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.
Handling Controller Inputs the Traditional 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 through keys"
- Only check "Use joystick, gamepad or other gaming device"
Known Issues¶
There may be instances where the controller behaves abnormally when attempting to reconnect the game controller rapidly in succession. For example, with the Switch Pro controller, if disconnection and reconnection are repeated in a short period, the mouse cursor may move in a specific direction without user intervention. This is an issue with the Switch Pro controller, and it can be resolved by pressing the sync button located on the left side of the wired connection terminal in case of problems.