Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: Capture gamepad as keyboard in Linux shell #116001
    targetboy
    Participant

    I figured it out. Here is the final script:

    #!/bin/bash
    joy2key -terminal -axis 0 0 0 0 -thresh 0 0 0 0 -buttons q q q q q q q q &
    fbi /home/slideshow/*.jpg -a -noverbose -u -t 120
    pkill joy2key

    The joy2key command starts reading the joystick with all buttons returning “q”. The “&” at the end makes it start in the background.

    The pkill statement kills the joy2kill process, that otherwise hung around throwing keys into the standard output and generally being a nuisance.

    in reply to: Capture gamepad as keyboard in Linux shell #115996
    targetboy
    Participant

    No luck. xboxdrv did not see the gamepad. I have been trying to use joy2key, but that does not seem to be what I need either. I used this command with joy2key:

    joy2key -terminal -axis 0 0 0 0 -thresh 0 0 0 0 -buttons q q q q q q q q

    The result was a cursor after the joy2key startup text. I could press buttons and it would display “q”, so it is reading the joystick. The thing is, it does not start the slideshow until I press Ctrl-C to break out, at which point it is not reading the stick any more.

    Is there some way I could start it in a different process, and end that process before exiting the script?

    Sorry to be so ignorant. I am not very experienced with Linux.

    in reply to: Capture gamepad as keyboard in Linux shell #115958
    targetboy
    Participant

    It is a generic USB gamepad styled after Nintendo 64 (I think). It has a D-pad, Buttons labeled A, B, X and Y and two shoulder buttons. Whatever works for the X-box controller should work for it as well. It si at least something to try.

Viewing 3 posts - 1 through 3 (of 3 total)