joy2key on Linux

Started by vim, July 30, 2011, 04:23:07 PM

Previous topic - Next topic

vim

Has anyone gotten joy2key to work with VVVVVV on Linux? I think I have it configured correctly, but VVVVVV seems to just ingore the input.

My .joy2keyrc:

COMMON
-X
-dev /dev/input/js0
-thresh -16383 16383 -16383 16383 -16383 16383 -16383 16383 -16383 16383
-16383 16383 -16383 16383 -16383 16383 -16383 16383 -16383 16383 -16383
16383 -16383 16383 -16383 16383 -16383 16383 -16383 16383 -16383 16383
-16383 16383 -16383 16383 -16383 16383 -16383 16383 -16383 16383 -16383
16383 -16383 16383 -16383 16383 -16383 16383 -16383 16383 -16383 16383
-16383 16383

START VVVVVV
-axis Left Right Up Down
-buttons space space Return space


I start VVVVVV and then invoke joy2key with: joy2key -config VVVVVV "VVVVVV" and it appears to connect without error:

joy2key - reads joystick status and dispatches keyboard events
By Peter Amstutz (tetron@interreality.org)
This is free software under the GNU General Public License (GPL v2)
              (see COPYING in the joy2key archive)
You are welcome to use/modify this code, and please e-mail me
if anything cool comes of it!
Version: 1.6.3   Binary built on Dec 22 2009 at 10:44:26

argtokey:read key Left dblcheck Left
argtokey:read key Right dblcheck Right
argtokey:read key Up dblcheck Up
argtokey:read key Down dblcheck Down
argtokey:read key space dblcheck space
arg2key fed with space space is a lower => 0
argtokey:read key space dblcheck space
arg2key fed with space space is a lower => 0
argtokey:read key Return dblcheck Return
arg2key fed with Return Return is a lower => 0
argtokey:read key space dblcheck space
arg2key fed with space space is a lower => 0
Initialization complete, entering main loop, ^C to exit...


And when I press buttons joy2key notices but VVVVVV doesn't.

iscap is now 0  sendkey: button_upper: 0 keycode  0x000072  114   sendkey: keysym Right
state hex 10
^[[Ciscap is now 0  sendkey: button_upper: 0 keycode  0x000072  114   sendkey: keysym Right
state hex 10
iscap is now 0  sendkey: button_upper: 0 keycode  0x000041  65   sendkey: keysym space
state hex 10
iscap is now 0  sendkey: button_upper: 0 keycode  0x000041  65   sendkey: keysym space
state hex 10
iscap is now 0  sendkey: button_upper: 0 keycode  0x000024  36   sendkey: keysym Return
state hex 10

iscap is now 0  sendkey: button_upper: 0 keycode  0x000024  36   sendkey: keysym Return
state hex 10


Am I doing something wrong? Could we just get native joystick support please? Keyboard controls are painful :\

Terry

Native joypad support is coming soon! (I've never tried using joy2key in linux so I can't help there, sorry)

d6chung

Quote from: Terry on July 30, 2011, 05:47:25 PM
Native joypad support is coming soon!

Sounds great! Looking forward to that!

@OP: In the mean time, I personally use qjoypad to map joypad to keyboard inputs.