AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Virtual joystick

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
Jabberwock
Guest





PostPosted: Wed Jul 07, 2004 6:43 am    Post subject: Virtual joystick Reply with quote

Is there a way to create a "virtual joystick" that would combine joysticks, keyboard scripts etc. into one controller?

If not, is such a feature planned?
Back to top
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10465

PostPosted: Wed Jul 07, 2004 12:50 pm    Post subject: Reply with quote

Although you can't yet simulate joystick movement or button presses, you can have a joystick send keystrokes or act as a mouse. If you want to use a keyboard or mouse as a joystick, I believe there is other software that can do that.
Back to top
View user's profile Send private message Send e-mail
BaldieJr



Joined: 02 Jul 2004
Posts: 23

PostPosted: Wed Jul 07, 2004 5:22 pm    Post subject: Reply with quote

A virtual joystick would be incredibly usefull.

Personally, I'd like to be able to edit my sticks response curve and use hotkeys to switch pre-made responses on-the-fly. Axis shifts would also be handy (button3 + Xaxis = slider1_virtualstick1). While I'm dreaming: use a pair of sliders to alter X/Y axis center (for trim controls Smile ) would be the icing on the cake.

I could think of new ideas all day Smile
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10465

PostPosted: Wed Jul 07, 2004 7:43 pm    Post subject: Reply with quote

Thanks I've made a note of those as potential features. Smile
Back to top
View user's profile Send private message Send e-mail
BaldieJr



Joined: 02 Jul 2004
Posts: 23

PostPosted: Thu Jul 08, 2004 3:11 am    Post subject: Reply with quote

Awesome.

One problem though: Most games require a constant setting for a joystick. This might cause potential problems when you set out to code something up.

An example would be button+axis = virtual_axis. Once the button is released (returning the axis to its origional function), the virtual axis would have to maintain its set input.

Neat stuff, but probably complex to write.

Honestly though, being able to manipulate axis data on-the-go (axis shaping?) and allowing multiple responses would probably be the Ultimate Flight Sim Function, especially if it can be done with little overhead.
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10465

PostPosted: Thu Jul 08, 2004 1:09 pm    Post subject: Reply with quote

Since it's so useful, maybe there are some joysticks -- especially those specialized for flight sims -- whose software already allows programming the buttons to alter the behavior of the axes.
Back to top
View user's profile Send private message Send e-mail
BaldieJr



Joined: 02 Jul 2004
Posts: 23

PostPosted: Thu Jul 08, 2004 8:57 pm    Post subject: Reply with quote

I've not encountered any. Maybe the really expensive joysticks can do this.

I did find something of interest though: ppjoy.

It has a virtual joystick driver built into it, and is very customizable. It even includes an app that sends mouse data to the OS via the virtual stick.... instant free joystick.

Thats good enough for me Smile

Any chance of getting the ability to send axis data to the virtual stick through autohotkey? The most elegant solution would be a virtual joystick driver provided by autohoykey, but hey, I'm not picky if I can accomplish what I want.

By the way: THANK YOU. I can't say it enough really. I wrote an loop-lock-unlock using two seperate keys but mulitple states (loop runs: Puase loop if key "X" is pressed, unpause if key "y" is pressed twice). I thought it was going to be difficult, but it was actually quite easy.
Back to top
View user's profile Send private message
BaldieJr



Joined: 02 Jul 2004
Posts: 23

PostPosted: Thu Jul 08, 2004 9:13 pm    Post subject: Reply with quote

Docs on sending to virtual stick:

http://www.geocities.com/deonvdw/Docs/PPJoyMain.htm?Page=http://www.geocities.com/deonvdw/Docs/Diagrams/Virtual/IOCTL.htm



FYI: That site uses frames poorly.
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10465

PostPosted: Thu Jul 08, 2004 11:06 pm    Post subject: Reply with quote

That's a nice site, thanks. It might be useful when the time comes to add joystick simulation (though hopefully that can be achieved without needing a special joystick driver, as this program appears to use).
Back to top
View user's profile Send private message Send e-mail
BaldieJr



Joined: 02 Jul 2004
Posts: 23

PostPosted: Fri Jul 09, 2004 4:26 am    Post subject: Reply with quote

Like I said, the more elegant solution would be low-level support via autohotkey, but if you can have autohotkey just talk to the ppjoy virtual joystick driver, I'd be happy as a pig in poo.

autohotkey could just read real_joystick_axis and send to virtual_joystick_axis (with altrerations, of course Smile ).

I think any sim-junky willing to learn autohotkey would be willing to install ppjoy.
Back to top
View user's profile Send private message
kasun sanjeeva
Guest





PostPosted: Mon Jun 02, 2008 5:55 am    Post subject: Re: Virtual joystick Reply with quote

Jabberwock wrote:
Is there a way to create a "virtual joystick" that would combine joysticks, keyboard scripts etc. into one controller?

If not, is such a feature planned?
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group