Results 1 to 7 of 7

Thread: Emulating Joystick Input in Linux ( C++ )

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2010
    Posts
    10
    Qt products
    Qt4
    Platforms
    MacOS X Windows
    Thanks
    3
    Thanked 2 Times in 1 Post

    Question Re: Emulating Joystick Input in Linux ( C++ )

    Don't worry... no problem ...Thanks anyway, @zuck !

    I'm still looking: Read alot about character devices, drivers, mayor and minor numbers and kernel in the past days.
    Maybe someone could tell me if I'm thinking correct right now:
    On the kernel I got usbhid which is the modul that controls the device driver and this device driver communicates with the char device file over the node I can create with mknod.
    And when putting on the actual device. Which part of all this talks to the physical device ? Is there another modul on the kernel checking the usb for changes ? And is the same thing writing to my node ? or where to ?
    Cause I guess I have to take over its role and write to my node !? I still have no clue in which way to send the data to the node, but if I'd know about the device that takes this task when an actual device is present I might find something.

    So... still hoping someone comes around and saves me !

  2. #2
    Join Date
    Jan 2010
    Posts
    10
    Qt products
    Qt4
    Platforms
    MacOS X Windows
    Thanks
    3
    Thanked 2 Times in 1 Post

    Exclamation Re: Emulating Joystick Input in Linux ( C++ )

    So nobody saved me but myself...
    and i can't imagine being the only one needing this, so if anyone else is ever gonna come looking for something like this, I at least want to give a solution:
    I implemented a module in Linux , a Device Driver, that writes through a device file the information that the joystick would usually give out... in form of js_event... if you wonder how to write the device driver... here are to very good explained examples.. well actually its the same example twice, but the second adds writing and ioctl into the first...
    here you go: http://www.linuxhq.com/guides/LKMPG/node14.html
    and http://tldp.org/LDP/lkmpg/2.4/html/c854.htm

    hope that helps...

  3. The following 2 users say thank you to invisible_uli for this useful post:

    pitonyak (1st March 2010), TheIndependentAquarius (5th January 2012)

  4. #3
    Join Date
    Apr 2011
    Posts
    231
    Thanks
    141
    Thanked 6 Times in 5 Posts

    Default Re: Emulating Joystick Input in Linux ( C++ )

    Just in case ...
    Quote Originally Posted by invisible_uli View Post
    I implemented a module in Linux , a Device Driver, that writes through a device file the information that the joystick would usually give out... in form of js_event...
    Can you present some hints or code on how did you achieve that?

Similar Threads

  1. Emulating Enter key with left mouse click
    By wconstan in forum Newbie
    Replies: 6
    Last Post: 30th December 2009, 16:16
  2. input audio
    By addu in forum Qt Programming
    Replies: 9
    Last Post: 10th September 2009, 11:12
  3. Emulating Unix on Windows
    By eichner in forum Qt Programming
    Replies: 5
    Last Post: 14th February 2008, 18:13
  4. QIntValidator input
    By chaos_theory in forum Qt Programming
    Replies: 4
    Last Post: 19th August 2007, 10:28
  5. regarding input widget
    By jagadish in forum Qt Tools
    Replies: 1
    Last Post: 28th June 2007, 12:07

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.