- Home /
what are the input codes for Sony Xperia Play keys?
Are there going to be input key codes for the Xperia Play by Sony?
Left Hand: Left, Right, Up, Down Left Shoulder
Right Hand: Triangle, Circle, Cross, Square Right Shoulder
Function: Select, Start.
And RAW data from the "thumb tabs"?
Here's a pic for anyone not familiar with a PS controller. http://www.eurodroid.com/pics/xperia_play_2.png
Answer by jashan · Apr 07, 2011 at 05:01 PM
Not a full answer but the only information I found so far:
How to develop gaming apps using the Xperia PLAY gamepad
Also, using Input.GetKey("left") works (as does "up", "down" and "right", of course).
But aside of that, I'm hoping to get some more info soon ... because trying to figure out the keycodes via:
public void OnGUI() {
if (Event.current.isKey)
Debug.Log(string.Format("Key pressed: {0}", Event.current.keyCode));
}
didn't work for me :-(
I found that article earlier today too. thanks. I'm going to need get me one to do testing. What a shame.
$$anonymous$$eanwhile, colargol also answered my question on the Unity forums with a link to a really nice tutorial which has all the information (this links to the forum posting): http://forum.unity3d.com/threads/84809-Xperia-Play-$$anonymous$$eycodes-in-Unity
They offer 30 day loaners to devs. Just pay shipping and handling. You'll need a credit card for that as well as for a "preauthorization" for the price of the device in case you don't return it.
Answer by Nicolaj Schweitz · Apr 18, 2011 at 08:23 AM
Xperia Play Keycodes in Unity
Input.GetKey (KeyCode.LeftShift) = Left shoulder Input.GetKey (KeyCode.RightShift) = Right shoulder
Input.GetKey (KeyCode.UpArrow) = Up Input.GetKey (KeyCode.LeftArrow) = Left Input.GetKey (KeyCode.RightArrow) = Right Input.GetKey (KeyCode.DownArrow) = Down
Input.GetKey ("joystick button 2") = /\ Input.GetKey ("joystick button 1") = [] Input.GetKey ("joystick button 3") = O Input.GetKey ("joystick button 0") = X
Input.GetKey (KeyCode.Pause) = SELECT Input.GetKey (KeyCode.Return) = START
AndroidInput = TouchPad
- Angry Mob Games made a Tutorial about it.
- Even More Info on Jashan's forum thread.
- ... and the other thread :-)
Oh... and rumors has it that an official tutorial is landing in the Asset Store at some point.
Your answer
Follow this Question
Related Questions
Run Sprint animation and stop it when button is released 1 Answer
key remaping menu 0 Answers
Check the latest key pressed? 2 Answers
troubles with changing scenes 3 Answers
Toggling with a key not working 2 Answers