Jump to content

Is it possible for one HOTAS switch/knob/etc to control TWO DCS bindings at the same time?


Recommended Posts

I have a rotary encoder on my throttle. I'd like to bind it's left / right turns to decrease and increase (respectively) BOTH the Formation Lights AND the Position Lights (on the Hornet).

By default, DCS removes one of these bindings to replace it with the other. 

Is there a way around this? 

I haven't 'hacked' the .lua file to duplicate the binding for both knobs because I don't want to break anything, but is this advisable / possible?

Link to comment
Share on other sites

I don't feel any fps problems with key management, on the other hand I had tried to manage an axis and the result had not been good.


I have different scripts (helicopter, warbird, jet) depending on the material used and the aircrafts.

Link to comment
Share on other sites

you can use in the modifiers tab to make a modifier or a switch that you can press to switch to an extra function. An encoder has 3 buttons - left, right and press. You can make the press a modifier, and use left and right, then map the modifier to the left and right as well (or as a switch) and you will get 2 additional key binds. To map them, map the initial left and right buttons, then tap the modifier and map the left and right buttons to different functions.


Edited by Hammer1-1

Intel 13900k @ 5.8ghz | 64gb GSkill Trident Z | MSI z790 Meg ACE| Zotac RTX4090 | Asus 1000w psu | Slaw RX Viper 2 pedals | VKB Gunfighter Mk3 MCE Ultimate + STECS/ Virpil MongoosT50+ MongoosT50CM | K-51 Collective + custom AH64D TEDAC | HP Reverb G2 | Windows 11 Pro | |Samsung Odyssey G9 | Next Level Racing Flight Seat Pro

The Boeing MQ-25A Sting Ray = Dirt Devil with wings
 My wallpaper and skins

Link to comment
Share on other sites

45 minutes ago, Hammer1-1 said:

you can use in the modifiers tab to make a modifier or a switch that you can press to switch to an extra function. An encoder has 3 buttons - left, right and press. You can make the press a modifier, and use left and right, then map the modifier to the left and right as well (or as a switch) and you will get 2 additional key binds. To map them, map the initial left and right buttons, then tap the modifier and map the left and right buttons to different functions.

 

Except the press toggles the external lights on/off. 

Link to comment
Share on other sites

Find another button for the modifier, thats all you really need. Doesnt have to be a bunch of modifiers, you only need one. Lets say you have 3 encoders: sacrifice one button and youll have 17 buttons.


Edited by Hammer1-1

Intel 13900k @ 5.8ghz | 64gb GSkill Trident Z | MSI z790 Meg ACE| Zotac RTX4090 | Asus 1000w psu | Slaw RX Viper 2 pedals | VKB Gunfighter Mk3 MCE Ultimate + STECS/ Virpil MongoosT50+ MongoosT50CM | K-51 Collective + custom AH64D TEDAC | HP Reverb G2 | Windows 11 Pro | |Samsung Odyssey G9 | Next Level Racing Flight Seat Pro

The Boeing MQ-25A Sting Ray = Dirt Devil with wings
 My wallpaper and skins

Link to comment
Share on other sites

you cant run 2 commands on the same button as they always conflict. the only way you can do that is by using a modifier or a switch. I get what you are trying to do, but you cant. Unless you are using a rotary that is an axis, you cant use a button to do more than one action. As far as an axis goes, you CAN map key strokes to a rotary with whatever software you use like Virpils or VKBs software setup. You can map a button stroke at 20%, 30%, 50%, 100%, etc - as many as you want and still retain the axis, but you cant use it to map more than one function to a button.

However...you CAN make a macro. Not sure what joystick you are using that has encoders (my MongoosT50 has 3 of them) but there are apps like RS Mapper that can make macros...Im finding out that its fairly labor intensive though. Easiest way to make a macro is through voice attack. The one and only drawback with a macro is that it absolutely has to have a keyboard command mapped to the commands you want to map. If there isnt one, you will have to fabricate one and hope it doesnt conflict with another key command in use.


Edited by Hammer1-1

Intel 13900k @ 5.8ghz | 64gb GSkill Trident Z | MSI z790 Meg ACE| Zotac RTX4090 | Asus 1000w psu | Slaw RX Viper 2 pedals | VKB Gunfighter Mk3 MCE Ultimate + STECS/ Virpil MongoosT50+ MongoosT50CM | K-51 Collective + custom AH64D TEDAC | HP Reverb G2 | Windows 11 Pro | |Samsung Odyssey G9 | Next Level Racing Flight Seat Pro

The Boeing MQ-25A Sting Ray = Dirt Devil with wings
 My wallpaper and skins

Link to comment
Share on other sites

Maybe hack the routine controlling the nav lights and add the formation lights command

Not tested but maybe on this principle:

.../... for example -- be careful the names of the commands are to be taken from the default.lua file of the folder 'input/keyboard', here the names are for example
    elseif command == Keys.ExtLightNav then  
        dev:performClickableAction(device_commands.extlight_nav, value, false)  -- control for navigation lights
        --then add the command line for the formation lights
        dev:performClickableAction(device_commands.formation_light, value, false) -- control for formation lights
        --
    elseif .../...

 

To be adapted and checked if the transmitted values are correct for the 2 commands and to be redone at each ED update...

While a third-party script is easier to use and does not change the integrity of the original file.


 

Link to comment
Share on other sites

On 7/12/2022 at 9:35 AM, Elphaba said:

I’ll check it out thanks. 
 

any fps hit from it?

Check out Joystick Gremlin. No real fps hit. Easy to do - I just did a test with triggering multiple buttons with one. Took about a minute to try.

http://whitemagic.github.io/JoystickGremlin/

With Gremlin, you will also install vjoy. This sets up a virtual joystick on your computer (in DCS it'll be "vjoy Device"). Then in Gremlin, you'll setup remap actions on your encoder. The remap actions allow you to send your device inputs to the virtual joystick. You can set as many of them up as you want.

Probably easier to explain with a screenshot from the test I did:

image.png

Button 1 is the trigger on my VKB. I've got 2 remap actions assigned to it, one to the Button 1 on the vJoy Device, and one to Button 8. So each time I pull the trigger, buttons 1 and 8 on the vJoy device get pressed. In DCS I'm then able to map buttons 1 and 8 on the vJoy device to separate controls, both activated by one pull of the trigger.

So in your case, you'd add remap events to your encoder pointing to the vJoy device you'd have setup. Then in DCS, you'd bind the light dial controls to the vJoy device and whatever buttons you remapped your encoder(s) to.

When doing the control setup in DCS, you might want to have just one remap action setup or active in Gremlin. Having both remaps active during setup might make it a coin toss as to whether to get the right input assigned.

With the encoders, also look into the macro action in Gremlin. You can control the duration of the encoder events that way, to control the 'speed' of the encoder. Plus that speed can be different per encoder, or shift-mode, or whatever. Like in your case of having one encoder control two dials - you could use macros to have the encoder turn those dials at different speeds.


Edited by Munkwolf
  • Thanks 2
Link to comment
Share on other sites

  • Recently Browsing   0 members

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