Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Raw key codes for Sony Xperia play and mobile keys

Author
Message
Psycho Psam
16
Years of Service
User Offline
Joined: 3rd Apr 2008
Location: Western Australia
Posted: 21st May 2012 18:56
I want to support the playstation keys the Sony Xperia play has. These are the scan codes - but the raw key command - integer GetRawKeyPressed( key ) doesn't return anything. Is there a way to support this device?

Standard Android hardware keys:
------------------------------
Back: 34
Search: 255
camera (HTC): 35
menu: 115


Xperia Play hardware keys:
-------------------------
left bumper: 122
right bumper: 123
arrows: left 33 right 32 up 30 down 31
square: 119 circle 34 triangle 120 X 35
select: 129
start: 128
The Zoq2
15
Years of Service
User Offline
Joined: 4th Nov 2009
Location: Linköping, Sweden
Posted: 21st May 2012 20:52 Edited at: 21st May 2012 20:52
Quote: "menu: 115"


The Menu button does not return anything on my galaxy note...
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 22nd May 2012 02:15
Officially we won't be supporting those keys, but if you want you can modify Core.cpp to accept them and compile a new interpreter in NDK.

Look for the function TranslateKey() that will take an AppGameKit key code and return the AppGameKit equivalent, this ensures that similar keys on different platforms return the same value. There are a few gaps in the number which leaves you some room to put these new values, as long as you return a value between 1 and 255 the corresponding entry in GetRawKeyState will be set.
Psycho Psam
16
Years of Service
User Offline
Joined: 3rd Apr 2008
Location: Western Australia
Posted: 22nd May 2012 03:55
So I'll need Tier2 for that right? How much is that to upgrade?
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 22nd May 2012 16:55
You get Tier 1 and Tier 2 with your purchase of AppGameKit, if you look in the AGK\IDE\apps folder you will find the code to compile the T1 interpreter.
Psycho Psam
16
Years of Service
User Offline
Joined: 3rd Apr 2008
Location: Western Australia
Posted: 22nd May 2012 18:31
Heh thanks - and I just opened AppGameKit and the first tip was...

"Library files for Tier 2 are stored at your AppGameKit installation folder/platform."

Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 22nd May 2012 19:25
That's correct. The core of Tier 2 are the library files that the native apps can link against. The AppGameKit Players are Tier 2 apps that we've written for you and run the interpreters that run your Tier 1 bytecode, and that you are free to modify for your own needs.

Login to post a reply

Server time is: 2024-11-23 14:20:15
Your offset time is: 2024-11-23 14:20:15