- Home /
ios bluetooth gamepad input working only on input text fields
Hi I've got connected Hama bluetooth gamepad (tried also one other) to iOS8.1 iphone5. It does connect fine, it does not say in settings which profile it uses but I assume its HID. However there is no input fired in Update() when checking for all keys.
//check keys
foreach(KeyCode keyCode in KeyCode.GetValues(typeof(KeyCode)))
if(Input.GetKey(keyCode))
{
lastGamepadKeyInput+=keyCode+" pressed, ";
Debug.Log(lastGamepadKeyInput);
lastGamePadKeyInputTime=Time.realtimeSinceStartup;
}
There are all keyboard and mouse keys including 4 joystics buttons in KeyCode definition. It does log all input perfectly on android with same bluetooth controllers.
In iOS does not get any event of key press unless If I put to GUI input text field and click on it in app. Then gamepad writes some letters on buttons and joysticks move. If input field is in legacy GUI then it also starts firing (Input.GetKey(keyCode) in Update(). If input text is in new UI system then it does only write in input itself.
how to check for key press of gamepad in iOS so I get keypress events consistently? I'm using 4.6.3 unity.
Thnanks
Your answer
![](https://koobas.hobune.stream/wayback/20220613191021im_/https://answers.unity.com/themes/thub/images/avi.jpg)