I'm trying to use a gamepad with my Galaxy S3. I've tried both a wireless Xbox 360 controller, and a wired original Xbox controller. They both have the same problem, which is the trigger axes are too noisy, and it is impossible to manually map axes to functions in games that require it, like Dead Trigger or SG: Shadowgun. I try to map a button? Nope, instantly mapped to right trigger! Try to map the left stick to the move function? Nope, also instantly mapped to the right trigger! Holding down the right trigger, or the left trigger, nothing seems to fix it. This happens on BOTH controllers, on BOTH games. So this is clearly a problem with android; it doesn't map deadzones.
So far, I've tried Pokejoy's USB/BT Joy Gold IME, GameKeyboard, Tincore Keymapper, and a couple other gamepad IME apps. None of them have given me what I want, which is to add a deadzone to the existing gamepad driver. I don't want to map the gamepad to the touchscreen to fool the game, because my games already support gamepads out of the box.
And I know for a fact it is POSSIBLE to get these controllers working, because the SuperGNES snes emulator app works great with both controllers, and maps the move function to the left stick just fine, without interference from the noisy triggers.
Any suggestions?
annnnnybody? This is really bugging me. I've seen so many videos of people using their xbox 360 controllers on their Androids, but it is impossible for me, because I can't remap the axes in the games, because they are instantly assigned to the trigger axis, because it is too noisy and has no dead zone! I need a way to force a dead zone on my gamepad!
Not to mention it is completely impossible to search for answers to my question on XDA or Google, because the assholes that made Shadowgun decided to release a sequel called "SG: Deadzone", so as soon as you search for "gamepad android deadzone", all you get are people looking to use their gamepad on that freakin game.
Well I fixed the issue myself. After some digging, it seems the axis mapping for gamepads is stored in /system/usr/keylayout/*.kl files. To figure out which file my gamepad was using, I read the logcat. It was using generic.kl. The axis mappings are at the bottom, after all the keyboard stuff.
I replaced this:
Code:
# Joystick and game controller axes.
# Axes that are not mapped will be assigned generic axis numbers by the input subsystem.
axis 0x00 X
axis 0x01 Y
axis 0x02 Z
axis 0x03 RX
axis 0x04 RY
axis 0x05 RZ
axis 0x06 THROTTLE
axis 0x07 RUDDER
axis 0x08 WHEEL
axis 0x09 GAS
axis 0x0a BRAKE
axis 0x10 HAT_X
axis 0x11 HAT_Y
with this, stolen from Vendor_045e_Product_028e.kl, which is the KL file for the Xbox 360 Wired USB controller:
Code:
# Left and right stick.
# The reported value for flat is 128 out of a range from -32767 to 32768, which is absurd.
# This confuses applications that rely on the flat value because the joystick actually
# settles in a flat range of +/- 4096 or so.
axis 0x00 X flat 4096
axis 0x01 Y flat 4096
axis 0x03 Z flat 4096
axis 0x04 RZ flat 4096
# Triggers.
axis 0x02 LTRIGGER
axis 0x05 RTRIGGER
# Hat.
axis 0x10 HAT_X
axis 0x11 HAT_Y
Even though I am using an original xbox controller and not an xbox 360 controller, the axis mappings were consistent, and this change alone fixed my issue. The default mappings in games were now useable, and I was able to remap axes without them being instantly assigned to the trigger axis.
I also learned that the "flat" value is the size of the deadzone. As the comments suggest, the default of 128 is too small, but their replacement of 4096 is, in my opinion, way too large. I settled on 1024 for my flat values, and it is a perfectly sized deadzone.
Note that I had to do this to get my wireless xbox 360 controller working too, because it was ALSO assigned to 'generic.kl'.
same problem
I also has the same problem, don't know whether use the IME can solve. trying
O MY GOD!
I have also same problems whit my OnePlus One (whit CM11s) and two Xbox360 Wired USB Controller buyed from Gamestop..... i have two of this:
https://www.gamestop.it/Xbox360/Games/20390/controller-wired-black-xbox-360
It's perfectly working and correctly assigned when i attach to my OPO using a OTG Cable... but i have try to use whit two games:
*** On Reckless Racing 3 ****
The controller working good.... but when the analog stick it's on center the car tends to skid a little to the left...... nothing serious but cause some problems
*** I have also try this to use with Little Big Adventure ***
Like upper problems but in this case the games it's unplayabe...... my character keeps making lateral movements to the left
Usually i used this same Controllers on windows 7.... here it's present a tools to make a calibration and some games have the option to set the DeadZone center area for resolve this problems but on Android i never found a APP to obtain a similar things.
Now i have found this thread and i have some question:
When i attach my controller on my OnePlus One.... how i can know what file it's been used or it's been loaded ?!?!? I have watched in the folder and i have so much file .kl and i don't know what it's the exact .kl i need to edit or similar things.... someone can help or explain this ?
moeburn said:
Well I fixed the issue myself. After some digging, it seems the axis mapping for gamepads is stored in /system/usr/keylayout/*.kl files. To figure out which file my gamepad was using, I read the logcat. It was using generic.kl. The axis mappings are at the bottom, after all the keyboard stuff.
I replaced this:
Code:
# Joystick and game controller axes.
# Axes that are not mapped will be assigned generic axis numbers by the input subsystem.
axis 0x00 X
axis 0x01 Y
axis 0x02 Z
axis 0x03 RX
axis 0x04 RY
axis 0x05 RZ
axis 0x06 THROTTLE
axis 0x07 RUDDER
axis 0x08 WHEEL
axis 0x09 GAS
axis 0x0a BRAKE
axis 0x10 HAT_X
axis 0x11 HAT_Y
with this, stolen from Vendor_045e_Product_028e.kl, which is the KL file for the Xbox 360 Wired USB controller:
Code:
# Left and right stick.
# The reported value for flat is 128 out of a range from -32767 to 32768, which is absurd.
# This confuses applications that rely on the flat value because the joystick actually
# settles in a flat range of +/- 4096 or so.
axis 0x00 X flat 4096
axis 0x01 Y flat 4096
axis 0x03 Z flat 4096
axis 0x04 RZ flat 4096
# Triggers.
axis 0x02 LTRIGGER
axis 0x05 RTRIGGER
# Hat.
axis 0x10 HAT_X
axis 0x11 HAT_Y
Even though I am using an original xbox controller and not an xbox 360 controller, the axis mappings were consistent, and this change alone fixed my issue. The default mappings in games were now useable, and I was able to remap axes without them being instantly assigned to the trigger axis.
I also learned that the "flat" value is the size of the deadzone. As the comments suggest, the default of 128 is too small, but their replacement of 4096 is, in my opinion, way too large. I settled on 1024 for my flat values, and it is a perfectly sized deadzone.
Note that I had to do this to get my wireless xbox 360 controller working too, because it was ALSO assigned to 'generic.kl'.
Click to expand...
Click to collapse
I need to be quoted and i need you help! How i can know what's the exact KL using my device when i attach my xbox controller !?!??!
I have read the logcat using a terminal emulator and i can find nothing inside it.... you can help me ?!??!?
---------- Post added at 07:02 PM ---------- Previous post was at 06:09 PM ----------
Sorry Mod....... but i need to make another consecutive reply but i have found a solution here:
http://forum.xda-developers.com/showpost.php?p=58239101&postcount=16
If someone want at this point you can join this my 3 reply......
Related
So I found out that my new Galaxy S3 supports USB-OTG, and gamepads. Well I just so happened to have an old Xbox (original, not 360) controller lying around, so I cut off the xbox connector off the end of the cable, and replaced it with a USB cable (so very easy). It works, sort of. The buttons and dpad all work fine, but getting the analog sticks and triggers needs help from 3rd-party drivers/software.
Specifically, the issues I'm having are:
- There is absolutely no deadzone whatsoever in the Android OS gamepad drivers, so unless the game itself implements a dead zone, this makes mapping axes to functions very difficult. For example, the game Shadowgun: Deadzone, has gamepad support built in, but it requires that you map each individual button and axis; there are no premade configurations. So this means I have to manually map the left analog stick to move, and the right one to look, by tapping on the function, and then moving the appropriate stick. But the problem is that the moment I tap on a function to map it, it is instantly mapped to the trigger axis, because of how noisy/sensitive the trigger axis is, and the fact that there is no deadzone. There is no way around this. It is simply impossible to map any of the axes/buttons because of the lack of a deadzone.
- Some games, however, do come with premade gamepad configurations, so that I don't have to map each function individually. The problem is, these games usually don't allow any custom mapping, and they almost always get the axes wrong. For example, the game Dead Trigger will let you use your gamepad right away, without any options or configuration required. The game maps the left analog stick to move, just fine, but it maps up/down look to up/down on the right stick, and left/right look to the triggers?! And worse yet, the triggers are one combined axis, so this means that I am constantly spinning around in circles like a retarded chicken on a merry-go-round, unless I press and hold both triggers.
So what I need is an app that can A) Force a dead zone on the gamepad, and B) Re-map one axis to another axis.
Anyone know of any Android apps that can do this?
Oh, and they have to work on a non-rooted device, because my S3 is still under warranty, and even though I know I can just unroot it if I need to send it back, I'm still afraid that I might break it while rooted and be unable to unroot it because it is broken.
Thanks for any help!
Did you find a solution to this Problem? I'm having the same issue when using the Ouya Controller with another Android Device.
Hi,
I bought the bigben stg one tablet controller.
Sadly the controller has some mapping problems in HID Mode.
First the mapping is wrong not like on a xbox 360 controller.
Left is B
Up is A
Down X
Right doesn't work at all. Some input debugging tool says "keycode 98 button_c"
Is there any way to remap these buttons ? Dumpsys says the controller use the generic keylayout.
Second problem the l2 and r2 trigger also doesn't work.
The debug tool says the buttons trigger axis 14 axis_rz from -1 to 1
And there is a little bigger deadzone for example in limelight app. Local games like dead trigger doesnt have this deadzone problem.
Does someone have any idear how to fix this?
Thx & greetings
Hi,
not sure if im doing this on the correct forum though
Modern Combat 3, latest version, ive read this game doesn't support controllers, but for some reasons, it recognizes the left analog left/right and dpad left/right as "Previous and Next Weapon" when my BT ipega controller is connected, and if I use touchscreen mappers like gamekeyboard, it overrides and goes together, when strafe/move left/right you also change weapons. why? is there something I can do to stop that?
thank you
MC4 works flawless though...
Hello everybody!
I just bought a new nvidia shield tablet k1, hoping to be able to use my Xiaomi Bluetooth gamepad with it.
At first everything seems OK, until I discovered that I'm not able to use the right trigger with all games on geforce now.
Is there a way to fix it?
I checked with the app "game controller tester" and all the buttons are perfectly recognised, that's an nvidia incompatibility.
Any help is appreciated!
EDIT: i'm sorry, I just realized i should post this question in Q&A
Bye
Same problem here, the pad also isn't recognised in a couple of other games either (Castle of Illusion and Dead Effect 2)
any updates on this issue?
any update on this?
I have same issue on Nvidia Shield TV. Right stick is not working and R1, which is main button in all race games.
Hello,
I had some issues with xiaomi gamepad too but I have another phone and my problem was a bit different but you still can try my solution, who knows, maybe it will help you. Implosion: Never Lose Hope didn't detect right stick so I was unable to shoot. I managed to solve this by custom .kl file which I got on 4pda (unfortunately I can't post links due to the restrictions of the forum).
What you need to do is:
1. Root your device
2. Create a file named Vendor_2717_Product_3144.kl and put the following in it:
Code:
# Xiaomi Gamepad
key 304 BUTTON_A
key 305 BUTTON_B
key 307 BUTTON_X
key 308 BUTTON_Y
key 310 BUTTON_L1
key 311 BUTTON_R1
key 312 BUTTON_L2
key 313 BUTTON_R2
key 315 BUTTON_START
key 314 BACK
key 172 HOME
key 317 BUTTON_THUMBL
key 318 BUTTON_THUMBR
axis 0x00 X
axis 0x01 Y
axis 0x02 Z
axis 0x05 RZ
axis 0x06 RTRIGGER
axis 0x0a LTRIGGER
axis 0x10 HAT_X
axis 0x11 HAT_Y
3. Put this file to a /usr/keylayout folder.
4. Change permissions for a file.
That's it, in my case there was no need in reboot, I just reconnected the gamepad to a phone and everything was fine.
Hello, I have a problem with my DS4 and Shadowgun: Deadzone, where when I load into a match, the camera spins upward and to the left, causing my character to spin infinitely. This does not effect my other inputs, only the right stick. The left stick moves perfectly fine, all inputs work as intended, but the game is unplayable because of this. Not only that, but when I try and set keybinds, the menu just says, "Axis 4 + " and nothing else, and all input except square, the input key, fail to recognize. My kl file is completely stock, just got this controller. That's why I'm confused, as I have done nothing to the controller, or Shadowgun, to warrant such behavior.
My DS4 automatically uses the Vendor_054c_Product_0268.kl
I have a Blu R1 HD, Version 6.0, rooted.