App-Idea: Hardware keys temporarily remapped for flash games etc. - Android Software Development

Can you write an app that modifies the
/system/usr/keylayout/trout-keypad.kl
/system/usr/keylayout/qwerty.kl
/system/usr/keylayout/trout-keypad-qwertz.kl
/system/usr/keylayout/trout-keypad-v2.kl
/system/usr/keylayout/trout-keypad-v3.kl
as described here on the second post of this thread: http://forum.xda-developers.com/showthread.php?t=551344
Specifically id like to remap my home or menu or back buttons easily so that I can have button presses in flash games. Robot unicorn attack for instance needs z and x button presses to play.
Alot of flash games only require a few buttons, but keyboardless devices will have trouble even with those requirements until you can cleanly remap what little buttons you have available.

Related

Keycodes

I'm trying to set up Duke Nukem 3D on the Wizard and can't find the key names or codes for various keys, like the camera, call, hang up, backlight etc...
Any ideas?
I think most of the hardware keys are in the normal range of F1, F2 etc.
Eg I think the hangup key is like F4.
Check here:
http://www.vijay555.com/index.php?Releases:VJKeyPress:Key_List
V
Aren't the pickup and hangup keys hard-bound in Windows Mobile to the phone options, and the nagup key is always set to hangup the phone call, or kill the current app? I've always found that I can minimise ANY running app by hitting the hangup key. Which has its uses, but is wholly impractical for mapping keys to functions in games and stuff.
christopherwoods: no the hard keys aren't mapped to the phone. Well, in a way they are, but not internally. Basically, if the phone app, cprog.exe, is working, it will intercept keys F3 and F4 and interpret those as dial/hangup keys. So using my program VJKeyPress you can simulate red and green with VJKeyPress 114 or 115
However, if you redefine the function of those keys, eg using a program like AE Button Plus, if you then simulate pressing F3 or F4, then it will perform the function chosen in AEButtonPlus. So, the keys can be overriden. Using VJKeyPress 114 will not simulate the phone key etc.
I've always found that I can minimise ANY running app by hitting the hangup key. Which has its uses, but is wholly impractical for mapping keys to functions in games and stuff
Click to expand...
Click to collapse
In normal use the red button doesn't minimse windows, it just jumps to the today screen I think. It certainly doesn't close windows. To close windows with the hangup key, check out my program VJOkButt.
Most programs written with GAPI will override the hardware key settings. However, if your game doesn't, use AE Button Plus to remap it to any other key press (perhaps by using my VJKeyPress). Then your game won't have fits when you press it.
V
Yeah, when I said minimise I meant that it shows the Today screen, and apps behave in the same way as if they're closed using the X - they don't really close, I know that for certain because... Well, that's how Windows Mobile (stupidly) behaves, and Switch shows them as still open.
I'd forgotten about your programs which can intercept keypresses and remap stuff... I must check those out sometime.
Does anyone know what I actually put into the config file, as in, the number or the words from that list or what?
mrsnoopy: I've never tried your game. Quote a few of the settings here and it should be easy to guess. I'd imagine the number though, not the words. Eg escape should always be 27 (or 1B if it's in hex).
V
awesome game in its day
used to play it on my 486 with 1 meg vga ram , yea !
Does it still have the taunts when u used to press an F key (in LAN multiplayer) come get some 2: who wants some 3:what are you some bottm beating scum sucking alge eater 4:it hurts to be you 5: your going to pay for that 6: wasted
cant think of any more .
much better in multiplayer , that work on the phone?

Does Pocketnester work with Dash 3G Trackball?

Hi guys I just upgraded my Dash to 3g. I installed pocketnester and when I play mario the only way he walks or runs is to keep scrolling the trackball. Can I use the trackball with pocketnester or do I have to assign buttons? Is there any other emulator out there that may support a trackball or a application to edit the trackball? Before I purchased I thought that if you just hold the trackball in one direction the object will keep moving. Thanks
The trackball actually emulates standard directional key presses. 2 or 3 quick swipes (configurable via the trackball control panel) will trigger "repeat mode".
The Snap is unfortunately a poor choice for emulation, unless you can remap the directional keys to keyboard keys.
bubble's right -- The trackball just emulates rapid directional button presses. However, you CAN assign the NES d-pad directions to keyboard buttons on the Snap/Dash 3G, as I have, and it's not bad. You may have to remap depending on the game you play, but it's not that hard. I play NES games on my Dash 3G constantly, and I don't have any control issues.
If you want to try the trackball, however, you CAN assign buttons to it. It's nearly unplayable, though.
pedrovay2003 said:
bubble's right -- The trackball just emulates rapid directional button presses. However, you CAN assign the NES d-pad directions to keyboard buttons on the Snap/Dash 3G, as I have, and it's not bad. You may have to remap depending on the game you play, but it's not that hard. I play NES games on my Dash 3G constantly, and I don't have any control issues.
If you want to try the trackball, however, you CAN assign buttons to it. It's nearly unplayable, though.
Click to expand...
Click to collapse
Could you provide some details on how to assign buttons? Also, what emulator are you using?
Many thanks.

How to get LG Expo keys to work in FpseCE and MorphGear

Before you get too excited this isn't a fix to the key mapping issue, it is simply me explaining how I've set up the keys to make games be playable on both emulators. with this set up they do work pretty well though.
FpseCE
First of all your going to want a frameskip of 0. With the snapdragon processor I've found that for the games I've tried at least it just makes them slower to add a frameskip.
Now for the keys. First open up the phone and then push the top left of the screen to go into portrait mode with the keys open. Your going to want to set the controller type to dual shock. Once that's done go into multikey. Push buttons 1-8 in order and unselect any buttons that are already highlighted and in use. then go back to 1 and start setting up your keys. This is how I set up mine.
Mutikey PS Controller Key Expo Key
1 Square Left
2 Circle Right
3 Triangle Up
4 X Down
5 R1 Camera Button
6 L1 Applications Button
7 Start Space Bar
8 Select Backspace
For racing games I switch the X and the R1 button because for some reason every time I pushed another key while holding X it would make me press X again to go again. Switching those two keys fixes that problem.
If you want to try and set up it differently for a certain game here is a list of all the keys that work for the LG Expo. (Left, Right, Up, Down, Space Bar, Enter/Ok (two buttons act as the same entry), Backspace, Camera Button, Application Button, Volume Up, Volume down)
Then go out of mutikey by pushing the back button on the phone. Go back to the controller and push the down arrow to set up the analog stick. Click on the box below the left analog stick until it shows a PSP looking device with the screen lit.
Push back on your phone and go into screen mapping. I prefer the 5 by 3 grid. Tap on the middle left most spot and change the control to left analog stick, an L with a circle around it. Make sure the input type is the arrows pointing both ways meaning it will only stay pressed as long as you press it. Then go to icon and change it to a target looking icon with a circle and a circle around it.
Now you're ready to play. Make the game full screen again and now your screen is the analog stick. Anywhere on the screen will actually activate the analog stick. What I do is put my thumb under the image on the screen so I can check and see which way it is facing without lifting my thumb.
MorphGear
The keys that work with MorphGear are the same as with FpseCE and those are (Left, Right, Up, Down, Space Bar, Enter/Ok (two buttons act as the same entry), Backspace, Camera Button, Application Button, Volume Up, Volume down).
I only play GBA games with my phone, so for other systems you may need to set them up differently, although these should work the same for the GB, GBC, NES, and many SNES games if not some others.
For up, down, left, and right I use those same buttons on the keyboard. I then use the Camera Button, Application Button and OK buttons for A, B, and R in different variations depending on the game I'm playing. Then use Volume Up and Volume Down for Start and Select. I put the Space Bar as the L button, but I don't intend on playing games that use it for anything else than occasional use.
If you were to play games that consistently use the L button you could either use Ok and Space Bar for A and B and then use the Camera Button and Application Button for the R and L buttons. However many games would also require you to press A and B at the same time so you would probably have to switch the A and B and the Start and Select buttons. it would be a bit weird holding the phone to play games with the A and B at the volume keys (most of the reason I avoid games that require use of the L key), but it would be playable.
Well, I hope all this helps.
You had me pretty excited there for a minute. Thanks for the info though.
Thanks for your excellent post! Would it be possible for you to upload your fpseCE configuration file? I am having problems getting fpseCE working, every rom i load just exits the program...
thendless said:
Thanks for your excellent post! Would it be possible for you to upload your fpseCE configuration file? I am having problems getting fpseCE working, every rom i load just exits the program...
Click to expand...
Click to collapse
First of all it might just be the version of fpsece you're using. I had some issues with that myself for a bit. Make sure you're using fpsece 0.10. You can get that here.
http://perso.numericable.fr/schtruck/FpseCE_010.zip
I've also attached my fpse.ini file as well in case it isn't just the version you are using. You are still going to need to edit the keys for your games like I mentioned in my first post to get those properly working.

[Q] Key combinations to launch tasks

I have searched quite some time to find answers to this so I will ask this here. I would like to trigger application executions or tasks (volume up for example) by pressing combinations of keys. So far, it seems no app accomplishes this neither does modifying any system file. I believe it requires something to detect multiple keypresses. Reason being is I would like to keep my Nook stock in appearance and only enter into an alternative launcher when needed. I quite like the aesthetics of the stock Nook but the available tools on android are indispensable. So, basically I am looking for something that will launch ReLaunch when I press both hardware down keys at once but ignore everything else. Perhaps trigger volume up and down by pressing "n" and up or down on either side. It's possible to do this in distros of linux but I have no idea about android or this version in particular. Does anyone know of any solutions? Thanks!
For combo buttons like that you'd have to hack android.policy.jar
You could always just use ButtonSavior instead.
That has popup softkeys on the screen.
If you have rooted with NookManager Nook Mod Manager allows you to assign actions to long presses. For example, I have a long press of the n button assigned to ReLaunch. A short press acts like normal and brings up the B&N quicklaunch.

Working Key Remapper mod/app available on S7?

I'm rooted and am a bit weary of flashing/installing Xposed (because of the fear of random reboots and what not) but want the ability to have Hold Back Button to Kill App mod/feature, among the ability to remap other hardware keys.
The All in one Gestures app works for remapping my hardware keys, if you deny the app root access. The hold back to kill app works, but when I set 'Menu' for long press recent apps key it says 'Your device is not supported'.
Basically, is there a known working key remapper app/mod that works for a rooted S7. I want the ability to remap my keys, like the long press back to kill and long press recent used apps button to open menu instead of multi-window.

Categories

Resources