Page 1 of 1

Can't map HW keys in a USB joypad

Posted: Sun Apr 15, 2012 7:13 pm
by Solid One
Using latest FPse (0.11.16, if my memory serves me right), I'm trying to configure an USB joypad plugged in my Android Media Box I bought from dx: http://dx.com/android-full-hd-1080p-media-player-w-usb-sd-hdmi-rj45-ports-black-2-x-aaa-102992. For that, I done the following steps (in the following order):

1. Rooted my device;
2. Downloaded an linux joypad kernel module that someone compiled for Android (joydev.ko) and loaded it w/ command:
$ insmod joydev.ko

3. Plugged my USB Joypad;
4. Changed permissions of /dev/input/js0 device link, with this command (needed for GamepadIME to work on my device):

Code: Select all

$ chmod 666 /dev/input/js*

5. Installed Gamepad IME app from Google Play (https://play.google.com/store/apps/details?id=de.killig.gamepadime);
6. Gone to Config -> Language & Keyboard, and in "Keyboard configuration", I've disabled all IME devices except Gamepad IME (created by Gamepad IME app), thus making it default one;
7. If joypad don't work until step 6, just go to Config -> Language & Keyboard and enter in any IME device configuration screen. It should appear an message in the middle of screen, telling device is detected. If it still don't work, go to Config -> Manage Applications -> Gamepad IME and choose "Force Close", and then repeat step 7.

Doing steps above, my USB joypad worked on Android. Button presses are translated as keypresses. The digital pad directions are translated to WASD keys, and his buttons to numeric keyboard keys. This way, I can play games on most Android emulators with my joypad.

But from all emulators I've tested (about seven emulators for different consoles), the only one that isn't working is FPse. I can't map any joypad button to HW keys. When I press a button, nothing happens. And strangely enough, It works when I plug an USB Keyboard to my device.

It was working before. When I was using FPse v0.10.10, I could map joypad buttons to HW keys nicely, so I think it may be a little bug simple to be solved.

Re: Can't map HW keys in a USB joypad

Posted: Mon Apr 16, 2012 8:42 am
by schtruck
have you tried to map buttons from Software drawing mode and GPU drawing mode? perhaps it will work on one of these mode as it's two different activity.

Re: Can't map HW keys in a USB joypad

Posted: Mon Apr 16, 2012 6:36 pm
by Solid One
Didn't checked it before. I'll test it later and post here results.

But anyway, I've found a workaround for this problem: Simply mapped my buttons using an USB keyboard. D-PAD arrows was mapped to W, A, S & D keys, keypad0 to Cross, keypad2 to Square, keypad3 to Triangle and so on.

The only unmapped button was Circle, but I think it's an Gamepad IME issue. It's happening 'cause Gamepad IME is mapping circle button to DPAD_CENTER, and I think it's a kind of special key. I can solve it by myself just by downloading Gamepad IME source code, editting default binding keys and recompiling it afterwards.

Re: Can't map HW keys in a USB joypad

Posted: Wed Apr 18, 2012 2:43 am
by Solid One
Sorry for double post, but...

schtruck wrote:have you tried to map buttons from Software drawing mode and GPU drawing mode? perhaps it will work on one of these mode as it's two different activity.


Software and GPU drawing modes are definitions for graphic rendering, right? I don't know if it has any relation to my controller problem, but I gave it a go anyway.

By default, Software drawing mode was already activated, and in this mode I'm unable to assign HW keys to my joypad. So I pressed Menu button and gone to MISC -> Download OpenGL plugin. After download finishes, drawing mode was changed from Software to GPU drawing mode (I guess).

I didn't tried reassigning keys from here, but this drawing mode isn't working. FPS was slower than in Software mode, and when I run Road Rash game from here, screen stayed white for almost all the time, flickering a little between white screen and actual game screen.