Jump to content

IS there a way to map mouse?


Harlikwin

Recommended Posts

Is there a way to map the map the mouse functionality onto one of the front throttle switches? I don't recall the name but the one with the clicky middle button. I'd rather use that to flip switches than take my hand off the throttle.

New hotness: I7 9700k 4.8ghz, 32gb ddr4, 2080ti, :joystick: TM Warthog. TrackIR, HP Reverb (formermly CV1)

Old-N-busted: i7 4720HQ ~3.5GHZ, +32GB DDR3 + Nvidia GTX980m (4GB VRAM) :joystick: TM Warthog. TrackIR, Rift CV1 (yes really).

Link to comment
Share on other sites

If you mean can you left and right click, then you can. Where you select the aircraft (on the left) go all the way down to UI Layer. It'll be in there.

hsb

HW Spec in Spoiler

---

 

i7-10700K Direct-To-Die/OC'ed to 5.1GHz, MSI Z490 MB, 32GB DDR4 3200MHz, EVGA 2080 Ti FTW3, NVMe+SSD, Win 10 x64 Pro, MFG, Warthog, TM MFDs, Komodo Huey set, Rverbe G1

 

Link to comment
Share on other sites

Well, I mean instead of using the mouse entirely so using the collie hat (little mini-stick up on the front) to move the mouse cursor, and then clicking.

New hotness: I7 9700k 4.8ghz, 32gb ddr4, 2080ti, :joystick: TM Warthog. TrackIR, HP Reverb (formermly CV1)

Old-N-busted: i7 4720HQ ~3.5GHZ, +32GB DDR3 + Nvidia GTX980m (4GB VRAM) :joystick: TM Warthog. TrackIR, Rift CV1 (yes really).

Link to comment
Share on other sites

Are u using the TARGET Script Editor? If so the code below will make the mini stick operate the mouse. You will still need to assign Left, Right, Scroll up, and Scroll Down, from the UI_Layer to buttons on the Warthog.

 

 

MapAxis(&Throttle, SCX, MOUSE_X_AXIS, AXIS_NORMAL, MAP_RELATIVE);
SetSCurve(&Throttle, SCX, 0, 10, 0, 0, -4);
MapAxis(&Throttle, SCY, MOUSE_Y_AXIS, AXIS_REVERSED, MAP_RELATIVE);
SetSCurve(&Throttle, SCY, 0, 10, 0, 0, -4);

 

 

The Button name is "SC". Hope that helps.

Night Ops in the Harrier

IYAOYAS


 
Link to comment
Share on other sites

Actually im not using it, just straight up mapping the stick in dcs. If thats the only way ill look into mapping it that way tho.

New hotness: I7 9700k 4.8ghz, 32gb ddr4, 2080ti, :joystick: TM Warthog. TrackIR, HP Reverb (formermly CV1)

Old-N-busted: i7 4720HQ ~3.5GHZ, +32GB DDR3 + Nvidia GTX980m (4GB VRAM) :joystick: TM Warthog. TrackIR, Rift CV1 (yes really).

Link to comment
Share on other sites

Ok thanks.

 

Where do i put that file in target?

New hotness: I7 9700k 4.8ghz, 32gb ddr4, 2080ti, :joystick: TM Warthog. TrackIR, HP Reverb (formermly CV1)

Old-N-busted: i7 4720HQ ~3.5GHZ, +32GB DDR3 + Nvidia GTX980m (4GB VRAM) :joystick: TM Warthog. TrackIR, Rift CV1 (yes really).

Link to comment
Share on other sites

The code below is a TARGET .tmc file. It is a template I use to start all my scripts for my various Modules. It already has 90% of the code you need to create a fully functional script for Mod. All the TMWH buttons are scripted but not assigned. To assign a key, uncomment the appropriate line and enter your desired key, as described in the Editor Manual.

I've also put in handy generic copy and paste lines in easy to reach locations.

 

  1. Create a new file in TARGET SE
  2. Copy and Paste that into Editor window OVERWRITING what is there by default
  3. Save as a .tmc
  4. Compile and run
  5. In DCS controls setion you will have to map your Joystick, Throttles, and Friction Lever Axis's under "Thrusmaster Virtual Controller" column.

The Slew stick is mapped as mouse axis already. You will see it move in Windows. It is a bit sensitive. Check the Script Editor Manual on how to adjust it.

 

You will also need to assign buttons to Left and right mouse buttons, as well as Scroll Up/Down in the UI_Layer in DCS.

 

I hope this helps and welcome to Editor Scripting.

 

 

include "target.tmh"
//program startup
int main()
{
   if(Init(&EventHandle)) return 1; // declare the event handler, return on error
   
   //add initialization code here
   
   Exclude(&HCougar);
   Exclude(&T16000);
   Exclude(&LMFD);
   Exclude(&RMFD);
   
   SetKBRate(22, 35);
   
   SetShiftButton(&Joystick, S4, 0, 0, 0);

//AXIS init        
   MapAxis(&Joystick, JOYX, DX_X_AXIS);
   MapAxis(&Joystick, JOYY, DX_Y_AXIS);
   
   //MapAxis(&Throttle, THR_LEFT, DX_ZROT_AXIS);
   MapAxis(&Throttle, THR_RIGHT, DX_Z_AXIS);
   
//*********Slew Stick acting as Mouse    
   MapAxis(&Throttle, SCX, MOUSE_X_AXIS, AXIS_NORMAL, MAP_RELATIVE);
       SetSCurve(&Throttle, SCX, 0, 10, 0, 0, -4);
   MapAxis(&Throttle, SCY, MOUSE_Y_AXIS, AXIS_REVERSED, MAP_RELATIVE);
       SetSCurve(&Throttle, SCY, 0, 10, 0, 0, -4);

//*********Slew Stick acting as independent AXIS.  NOT Mouse!!!  Used to setup control of A/C TDC        
//    MapAxis(&Throttle, SCX, DX_XROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
//        SetSCurve(&Throttle, SCX, 0, 10, 0, 0, -4);
//    MapAxis(&Throttle, SCY, DX_YROT_AXIS, AXIS_REVERSED, MAP_ABSOLUTE);
//        SetSCurve(&Throttle, SCY, 0, 10, 0, 0, -4);
   //TDC Slew Control on Throttle Mini Stick    
   //KeyAxis(&Throttle, SCX, 0, AXMAP2(3,Throttle_Designator_Controller_Left,0,Throttle_Designator_Controller_Right));
   //KeyAxis(&Throttle, SCY, 0, AXMAP2(3,Throttle_Designator_Controller_Down,0,Throttle_Designator_Controller_Up));    
       
   MapAxis(&Throttle, THR_FC, DX_SLIDER_AXIS);    
   
// Init Lights  Programing light below
   ActKey(PULSE+KEYON+LED(&Throttle, LED_INTENSITY, 10)); //set Throttle backlight power to middle // set Throttle backlight power to low
   ActKey(PULSE+KEYON+LED(&Throttle, LED_ONOFF, LED_CURRENT+LED1)); //set LED 1 On
   ActKey(PULSE+KEYON+LED(&Throttle, LED_ONOFF, LED_CURRENT-LED2)); //set LED 2 OFF
   ActKey(PULSE+KEYON+LED(&Throttle, LED_ONOFF, LED_CURRENT+LED3)); //set LED 3 On
   ActKey(PULSE+KEYON+LED(&Throttle, LED_ONOFF, LED_CURRENT-LED4)); //set LED 4 OFF
   ActKey(PULSE+KEYON+LED(&Throttle, LED_ONOFF, LED_CURRENT+LED5)); //set LED 5 On
// Flags...    
   
//////////////////////////////////////////////////////////////////////    
//BUTTON PROGRAMING STARTS BELOW
//////////////////////////////////////////////////////////////////

//STICK PROGRAMING

//MapKey(&Joystick,);
//MapKeyIO(&Joystick,,);

//MapKeyIOUMD(&Throttle,,
//                            ,
//                            ,
//                            ,
//                            ,
//                            ,
//                            );
//Trigger
//MapKey(&Joystick,TG1,);
//MapKey(&Joystick,TG2,);

//Buttons
//MapKey(&Joystick,S1,);
//MapKey(&Joystick,S2,);
//MapKeyI&Joystick,S3,);
//MapKey(&Joystick,S4,);

//DMS
//MapKey(&Joystick,H3U,);
//MapKey(&Joystick,H3D,);
//MapKey(&Joystick,H3R,);
//MapKey(&Joystick,H3L,);

//TMS
//MapKey(&Joystick,H2U,);
//MapKey(&Joystick,H2D,);
//MapKey(&Joystick,H2R,);
//MapKey(&Joystick,H2L,);

//CMS
//MapKey(&Joystick,H4U,);
//MapKey(&Joystick,H4D,);
//MapKey(&Joystick,H4R,);
//MapKey(&Joystick,H4L,);

//MapKey(&Joystick,H4P,);


//Trim
//MapKeyIO(&Joystick,H1U,);
//MapKeyIO(&Joystick,H1D,);
//MapKeyIO(&Joystick,H1R,);
//MapKeyIO(&Joystick,H1L,);
   
//THROTTLE PROGRAMING

//MapKey(&Throttle,,);
//MapKeyIO(&Throttle,,,);

//MapKeyIOUMD(&Throttle,,
//                            ,
//                            ,
//                            ,
//                            ,
//                            ,
//                            );
//Coolie Hat
//MapKey(&Throttle,CSD,);
//MapKey(&Throttle,CSU,);
//MapKey(&Throttle,CSR,);
//MapKey(&Throttle,CSL,);

//Slew
//MapKey(&Throttle,,Slew_DWN);//Set to operate in AXIS Section
//MapKey(&Throttle,,Slew_UP);//Set to operate in AXIS Section
//MapKey(&Throttle,,Slew_RT);//Set to operate in AXIS Section
//MapKey(&Throttle,,Slew_LT);//Set to operate in AXIS Section

//MapKey(&Throttle,SC,);


//Left Throttle Button
//MapKey(&Throttle,LTB, );

//Pinky Switch
//MapKey(&Throttle,PSF,Pinky_FWD);
//MapKey(&Throttle,PSM,Pinky_MID);
//MapKey(&Throttle,PSB,Pinky_AFT);

//MIC Switch
//MapKey(&Throttle,MSR,);
//MapKey(&Throttle,MSL,);
//MapKey(&Throttle,MSU,);
//MapKey(&Throttle,MSD,);

//MapKey(&Throttle,MSP,);

//Speed Brake
//MapKeyIO(&Throttle,SPDF,;
//MapKeyIO(&Throttle,SPDM,);
//MapKeyIO(&Throttle,SPDB,);

//Boat Switch
//MapKey(&Throttle,BSF,);
//MapKey(&Throttle,BSM,);
//MapKey(&Throttle,BSB,);

//China Hat
//MapKey(&Throttle,CHF,);
//MapKey(&Throttle,CHM,);
//MapKey(&Throttle,CHB,), );

//THROTTLE Base PROGRAMING
//MapKey(&Throttle,,);
//MapKeyIO(&Throttle,,,);

//MapKeyIOUMD(&Throttle,,
//                            ,
//                            ,
//                            ,
//                            ,
//                            ,
//                            );

//Engine Fuel Flow LT/RT
//MapKey(&Throttle,EFLNORM,);
//MapKey(&Throttle,EFLOVER,);
//MapKey(&Throttle,EFRNORM,);
//MapKey(&Throttle,EFROVER,);

//Engine Operator LT/RT
//MapKey(&Throttle,EOLIGN,);
//MapKey(&Throttle,EOLNORM,);
//MapKey(&Throttle,EOLMOTOR,);

//MapKey(&Throttle,EORIGN,);
//MapKey(&Throttle,EORNORM,);
//MapKey(&Throttle,EORMOTOR,);

//Throttle Friction Control
//Set to operate in AXIS Section

//APU Switch
//MapKey(&Throttle,APUON,);
//MapKey(&Throttle,APUOFF,);

//Landing Gear Button
//MapKey(&Throttle,LDGH, );

//Autopilot Select Switch
//MapKey(&Throttle,APPAT,);
//MapKey(&Throttle,APAH,);
//MapKey(&Throttle,APALT,);


//Autopilot Engage/Diengage Button
//MapKey(&Throttle,APENG,);

//Radar Altimeter Mode
//MapKey(&Throttle,RDRNRM,);
//MapKey(&Throttle,RDRDIS,);

//EAC On/Off
//MapKey(&Throttle,EACON,);
//MapKey(&Throttle,EACOFF,);

//Flap
//MapKey(&Throttle,FLAPU,);
//MapKey(&Throttle,FLAPM,);                                
//MapKey(&Throttle,FLAPD,);

//Throttle Idle Cutoff
//MapKey(&Throttle,IDLEROFF,);    
//MapKey(&Throttle,IDLERON,);

//MapKey(&Throttle,IDLELOFF,);
//MapKey(&Throttle,IDLELON,);
   
   
}

//event handler
int EventHandle(int type, alias o, int x)
{
   DefaultMapping(&o, x);
   
   //add event handling code here
}

 

Night Ops in the Harrier

IYAOYAS


 
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...