Forums » Technology » Flight Sim Controllers » T.A.R.G.E.T. (Thrustmaster) » mouse cursor...linking virtual one to physical one in T.A.R.G.E.T. Active Topics You are not logged in. [Log In] [Register User]
Topic Options
Rate This Topic
Hop to:
#4012519 - Yesterday at 07:39 AM mouse cursor...linking virtual one to physical one in T.A.R.G.E.T.
SpaceBlaze Offline
Junior Member

Registered: 12/14/13
Posts: 7
Hello,

I use a T16000M (actually two...but that's not important right now)

I want to use this code:

//let's tell TARGET we want a mouse on our HAT
int fastmousecursor;
int slowmousecursor;


int main()
{
some stuff...
SetShiftButton (&T16000, TS2, 0, 0, 0 ,0 ); // Left TS2= IO toggle...(why all the zero's?)

//lets get ourselves our moving mousecursor on our left stick (T16000)....and at two speeds (H1D of the right stick (T16001) to go fast)
fastmousecursor=
MapKey (&T16000, H1U, AXIS(MOUSE_Y_AXIS, -100, 5));
MapKey (&T16000, H1D, AXIS(MOUSE_Y_AXIS, 100, 5));
MapKey (&T16000, H1L, AXIS(MOUSE_X_AXIS, -100, 5));
MapKey (&T16000, H1R, AXIS(MOUSE_X_AXIS, 100, 5));

slowmousecursor=
MapKey (&T16000, H1U, AXIS(MOUSE_Y_AXIS, -100, 32));
MapKey (&T16000, H1D, AXIS(MOUSE_Y_AXIS, 100, 32));
MapKey (&T16000, H1L, AXIS(MOUSE_X_AXIS, -100, 32));
MapKey (&T16000, H1R, AXIS(MOUSE_X_AXIS, 100, 32));
//hmmm....this one can just be programmed without the 'slowmousecursor=' part, right? Why would I need that, lol..
//5 and 32...the higher...the greater the time interval. and 100 is how many pixels it skips

MapKeyIO (&T16001, H1D, 'z', EXEC("fastmousecursor") );
// launch flare (z in Star Citizen) in layer, or out of layer have a button that let's me have a faster mouse corsor on the other stick POV HAT.
Does this kill the 'slowmousecursor' if I just programmed that plain without any EXEC of stuff like that?


My real problem is.... TARGET seems to let me have 2 mouse cursors!
I can move the mouse cursor with my mouse....but when I move it with my HAT, the cursor get's reset to the middle of the screen, and from there on
-when I use the physical mouse it moves on from where I leave from either the mouse itself or the HAT, but
-when I use the hat's mouse cursor moving abilities, it get's reset from where the HAT mouse coordinates left last.
really weird..
The physical mouse seems to use both it's own and the TARGET's coordinates, where TARGET only seem to know it's own.

I want to link the coordinates of both the visual mouse and physical mouse. Link their indexes or let them peek at eachothers.

They should share their coordinates. Now it is only done half.
I have no idea how to program it so they 100% share their cursor..
It might even fix the issue so SC doesn't crash when I use mouse code. (the cursor get's locked out of screen the second I touch the HAT, and the starship starts flippin violantly as it tries to follow the cursor)


Edited by SpaceBlaze (Yesterday at 07:49 AM)
_________________________


When the Space is Blazed
The Space Blaze...

Top
#4012554 - Yesterday at 08:47 AM Re: mouse cursor...linking virtual one to physical one in T.A.R.G.E.T. [Re: SpaceBlaze]
SpaceBlaze Offline
Junior Member

Registered: 12/14/13
Posts: 7
Hmmm... C programmers might need more code to figure out how TARGET works. Here is the TARGET codes (just open with notepad or your own code reader/doer):

http://www.speedyshare.com/QkM6p/target.tmh

http://www.speedyshare.com/uNEPF/sys.tmh

http://www.speedyshare.com/zndtq/hid.tmh

http://www.speedyshare.com/xvVN8/defines.tmh

And my own file looks like this (still needs a lot of change, cause it's an old file, but it shows more code)

http://www.speedyshare.com/5DKNc/Solbeamer-22.3a-all-new.tmc


To be clear...in this last file all the stuff of linking it must be. That's the only file I can tinker with.
The other files are part of software.


Edited by SpaceBlaze (Yesterday at 08:56 AM)
_________________________


When the Space is Blazed
The Space Blaze...

Top
#4012640 - Yesterday at 02:01 PM Re: mouse cursor...linking virtual one to physical one in T.A.R.G.E.T. [Re: SpaceBlaze]
CyBerkut Offline
Former Quantum Mechanic
Member

Registered: 07/24/09
Posts: 1528
Loc: North of St. Petersburg
I'm not up on TARGET scripting, but the described problem sounds like the hat is doing absolute instead of relative input. I would think that if you want the hat to move the cursor from whatever position the mouse left it at, you would need to have the hat outputting in a relative fashion, rather than absolute.

Something to investigate, perhaps.
_________________________
"Firearms are second only to the Constitution in importance; they are the peoples' liberty's teeth.” - George Washington

“Rightful liberty is unobstructed action according to our will within limits drawn around us by the equal rights of others. I do not add 'within the limits of the law' because law is often but the tyrant's will, and always so when it violates the rights of the individual.” - Thomas Jefferson

Top
Topic Options
Rate This Topic
Hop to:

Moderator:  EinsteinEP, RacerGT 
 
Quick Search
Recent Articles
Support SimHQ
.
Social


Recent Topics
Back to the Pak (6)...
by BeachAV8R
Today at 09:09 PM
Pilot Civilian Air Rescue
by BeachAV8R
Today at 08:32 PM
SABOW: Viewing Other Units
by CAVCPT
Today at 08:30 PM
Pilot Civilian Air Rescue
by BeachAV8R
Today at 08:29 PM
Toulouse Air Show 2014
by corsaire31
Today at 06:38 PM
Surprised.....
by Skylark
Today at 05:07 PM
Tropico 3 free giveaway.
by komemiute
Today at 04:48 PM
iPhone 6 vs. .50 cal
by Chaz
Today at 04:33 PM
Military Monday - 22nd September
by Meatsheild
Today at 02:37 PM
Official NHL 2014/2015 thread
by WangoTango
Today at 11:07 AM
 

Forum Use Agreement | Privacy Statement
Copyright 1997-2014, SimHQ Inc. All Rights Reserved.