Aqua Dark Material Theme for CM12

XDA Senior MemberSimix93prepared a nice looking theme changing the original colors into shades of green. … more

Fonts Collection for CyanogenMod 12

Check out this collection of amazing fonts ready to make your CyanogenMod 12 ROM even more beautiful. … more

Send Links to Any Nearby Device with CaastMe

There already are many solutions on the Google Play store if you want to send a link to one of … more

Samsung Galaxy S4 Is Getting Lollipop Update in Russia

Samsung Galaxy S4 users in Russia are getting the Lollipop update via OTA. The update … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

Using hardware keys in games

OP worldextermination

5th January 2014, 11:52 PM   |  #1  
worldextermination's Avatar
OP Member
Flag Philadelphia, PA
Thanks Meter: 26
 
42 posts
Join Date:Joined: Jan 2013
More
I recently started playing Critical Strike Portable on my LG OG Pro, and I noticed it's hard to aim and shoot at the same time. My fix for this is to assign the button above the volume buttons (default is camera on PAC-ROM) as the fire key. Question is, how do I do this? I assume I'd have to unpack the APK and edit the configuration file to accept the key as fire. But I'm sure I'd have to throw some device specific mumbo jumbo in there to get it to work properly. Can anyone help me out or point me in the right direction? Thank you!

Sent from my LG-E980 using xda app-developers app
6th January 2014, 06:07 AM   |  #2  
Member
Thanks Meter: 5
 
61 posts
Join Date:Joined: Nov 2011
Quote:
Originally Posted by worldextermination

I recently started playing Critical Strike Portable on my LG OG Pro, and I noticed it's hard to aim and shoot at the same time. My fix for this is to assign the button above the volume buttons (default is camera on PAC-ROM) as the fire key. Question is, how do I do this? I assume I'd have to unpack the APK and edit the configuration file to accept the key as fire. But I'm sure I'd have to throw some device specific mumbo jumbo in there to get it to work properly. Can anyone help me out or point me in the right direction? Thank you!

Sent from my LG-E980 using xda app-developers app

Use a ps3 controller over bluetooth instead, if you have that.
6th January 2014, 06:18 AM   |  #3  
worldextermination's Avatar
OP Member
Flag Philadelphia, PA
Thanks Meter: 26
 
42 posts
Join Date:Joined: Jan 2013
More
I don't have one, although I do have an Xbox 360, which I believe is bluetooth as well, but that kind of defeats the purpose.
6th January 2014, 09:39 PM   |  #4  
Neroga's Avatar
Senior Member
Flag Saint Cloud, Florida
Thanks Meter: 565
 
1,282 posts
Join Date:Joined: Feb 2012
More
I'm not exactly sure what to change it to but editing the hardware buttons is quite simple. Go to /system/usr/keylayout/gk-keypad-8064.kl and change key 250 to something else. I would assume that changing it to 1 would make it type the number 1 so you might be able to assign fire to that hardware button if the app allows it.

Sent from my Optimus G Pro using XDA Premium 4 mobile app
7th January 2014, 01:07 AM   |  #5  
worldextermination's Avatar
OP Member
Flag Philadelphia, PA
Thanks Meter: 26
 
42 posts
Join Date:Joined: Jan 2013
More
Sweet! I'll try it as soon as I get home! Though I'm not sure what I would assign it to, since the game uses touch commands. Is there any way I can edit the game's APK to assign the key to fire only while the game is open?

Sent from my LG-E980 using xda app-developers app
7th January 2014, 01:37 AM   |  #6  
Neroga's Avatar
Senior Member
Flag Saint Cloud, Florida
Thanks Meter: 565
 
1,282 posts
Join Date:Joined: Feb 2012
More
Quote:
Originally Posted by worldextermination

Sweet! I'll try it as soon as I get home! Though I'm not sure what I would assign it to, since the game uses touch commands. Is there any way I can edit the game's APK to assign the key to fire only while the game is open?

Sent from my LG-E980 using xda app-developers app

I'm no sure. Never got into modifying APKs. There IS an app called Game Keyboard (paid) that allows you to assign hardware keys to touch inputs. It's well worth the few bucks. I use it for just about every game / emulator I have as you can make your own custom layouts.

Sent from my Optimus G Pro using XDA Premium 4 mobile app
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes