Jump to content

Please Enable Binding To Mouse


Khangirey

Recommended Posts

In all respects, this is a rather superficial problem, but the Mig-21 module is the only one I know of that doesn't let you bind things to the mouse. In fact, the whole column is greyed out in the controls options. 

I'd like to be able to bind a mouse button to open up the \ menu as in other planes, however there is no way to do that with this module. 

  • Like 6
  • Thanks 3
Link to comment
Share on other sites

I'd second that - why artificially limit our options like that? I've got spare buttons on my mouse, why not let me use them? 😉

FIX: 

Open "....\DCSWorld\Mods\aircraft\MIG-21bis\Input\MiG-21\mouse\default.lua"

Make a backup copy before editing. 😉

Look for this part:

keyCommands={

{combos = {{key = 'MOUSE_BTN3'}}, down = iCommandViewTransposeModeOn, up = iCommandViewTransposeModeOff, name=_('Camera transpose mode (press and hold)'),category=_('View')},


},

Now, you can copy and paste commands from "....\DCSWorld\Mods\aircraft\MIG-21bis\Input\MiG-21\keyboard\default.lua", but you need to remember to change the "key" value from the keyboard binding to a mouse button. Like this:

keyCommands={

--{combos = {{key = 'MOUSE_BTN3'}}, down = iCommandViewTransposeModeOn, up = iCommandViewTransposeModeOff, name=_('Camera transpose mode (press and hold)'),category=_('View')},
{combos={{key='MOUSE_BTN3'}},down=device_commands.RadioINTERCOM,up=device_commands.RadioINTERCOM,cockpit_device_id=devices.INTERCOM,value_down=1.0,value_up=0.0,name=_('Intercomm menu'),category=_('Radio Communications')},


},

In this case I commented out (using "--" at the beginning of the line) the whole "Camera transpose" command and added a comms command on MOUSE_BTN3.

Keep in mind your changes may be lost on next (or any) update.


Edited by Xupicor
  • Windows 11 Pro, RTX4090 (24GB), 5950X @ 4.3GHz, 64GB RAM @ 3000MHz, M.2 SSD 8TB, Pimax Crystal
  • Modules and maps: All of 'em. (It's a problem...)
Link to comment
Share on other sites

  • 1 month later...
On 7/25/2022 at 7:27 AM, Xupicor said:

I'd second that - why artificially limit our options like that? I've got spare buttons on my mouse, why not let me use them? 😉

FIX: 

Open "....\DCSWorld\Mods\aircraft\MIG-21bis\Input\MiG-21\mouse\default.lua"

Make a backup copy before editing. 😉

Look for this part:

keyCommands={

{combos = {{key = 'MOUSE_BTN3'}}, down = iCommandViewTransposeModeOn, up = iCommandViewTransposeModeOff, name=_('Camera transpose mode (press and hold)'),category=_('View')},


},

Now, you can copy and paste commands from "....\DCSWorld\Mods\aircraft\MIG-21bis\Input\MiG-21\keyboard\default.lua", but you need to remember to change the "key" value from the keyboard binding to a mouse button. Like this:

keyCommands={

--{combos = {{key = 'MOUSE_BTN3'}}, down = iCommandViewTransposeModeOn, up = iCommandViewTransposeModeOff, name=_('Camera transpose mode (press and hold)'),category=_('View')},
{combos={{key='MOUSE_BTN3'}},down=device_commands.RadioINTERCOM,up=device_commands.RadioINTERCOM,cockpit_device_id=devices.INTERCOM,value_down=1.0,value_up=0.0,name=_('Intercomm menu'),category=_('Radio Communications')},


},

In this case I commented out (using "--" at the beginning of the line) the whole "Camera transpose" command and added a comms command on MOUSE_BTN3.

Keep in mind your changes may be lost on next (or any) update.

 

Thank you for this! But I tried it, and nothing seemed to be working.

I seem to have 2 DCS folders with input .lua files. One in my C:\...\Saved Games\DCS.openbeta\Config\Input\MiG-21Bis\mouse, and another in E:\DCS World OpenBeta\Mods\aircraft\MIG-21bis\Input\MiG-21\mouse

I'm not sure why its set up like this. But I created a new mouse profile in each folder with the below key command lines, but if I load either of them, they simply don't work. There is no visible mouse key bound in the controls window, and it doesn't work in the plane itself. However, double-clicking MOUSE_BTN3 does allow me to enter transpose mode and use my mouse wheel to transpose my pilot's head forward or backward.

keyCommands={

{combos = {{key = 'MOUSE_BTN3'}}, down = iCommandViewTransposeModeOn, up = iCommandViewTransposeModeOff, name=_('Camera transpose mode (press and hold)'),category=_('View')},
{combos = {{key = 'MOUSE_BTN4'}}, pressed = iCommandViewForwardSlow, up = iCommandViewForwardSlowStop,name=_('Zoom in slow'),category=_('View')},
{combos = {{key = 'MOUSE_BTN5'}}, pressed = iCommandViewBackSlow, up = iCommandViewBackSlowStop,name=_('Zoom out slow'),category=_('View')},

},

Any ideas or help would be awesome. Startup is a lot slower in this jet because I'm not able to zoom fast and look around the cockpit. It's honestly such a stupid inconvenience to leave this out.

Thank you!


Edited by Onslott
Link to comment
Share on other sites

I just ran an instant action mission in Mig-21 and it seems I can bind mouse buttons to "Zoom in slow" and "Zoom out slow" just fine now. Can you confirm it works for you as well? Seems they fixed it?

As for your changes:

  • any reason why you used "pressed" instead of "down"? I used "down" and it worked.
  • for the changes I described you should use the files in the main game installation directory, not the Saved Games/DCS directory. However, that makes me think if we can't do it in a better way yet... Standby on that.
  • you need unique names for keybinds - add " ALT" or something in the end to make them different than the ones already in there.

Anyway, I tried it and it didn't work for me in mouse/default.lua - however I could add the lines to keyboard/default.lua and it did show up (I just used alternate names) No need to do that, though, since they are already there and you can just change the existing lines.

  • Windows 11 Pro, RTX4090 (24GB), 5950X @ 4.3GHz, 64GB RAM @ 3000MHz, M.2 SSD 8TB, Pimax Crystal
  • Modules and maps: All of 'em. (It's a problem...)
Link to comment
Share on other sites

On 9/12/2022 at 4:28 AM, Breakaway said:

Would be nice to bind 'clickable mouse cockpit mode' to the mouse! 😬

 

In a lot of modules it's the mouse wheel button - if it doesn't work immediately (enters transpose mode instead) then double click it.

Also - hold, movie view and release should be possible with lua editing. I may take a look at that.


Edited by Xupicor
  • Windows 11 Pro, RTX4090 (24GB), 5950X @ 4.3GHz, 64GB RAM @ 3000MHz, M.2 SSD 8TB, Pimax Crystal
  • Modules and maps: All of 'em. (It's a problem...)
Link to comment
Share on other sites

55 minutes ago, Xupicor said:

In a lot of modules it's the mouse wheel button - if it doesn't work immediately (enters transpose mode instead) then double click it.

Also - hold, movie view and release should be possible with lua editing. I may take a look at that.

 

I will try it, but in all other modules I'm able to bind it to the side mouse button on my Logi G502, scroll wheel for me is zoom in/out. its just how I like it😎

Link to comment
Share on other sites

  • 2 weeks later...
On 9/14/2022 at 1:31 AM, Breakaway said:

scroll wheel for me is zoom in/out. its just how I like it😎

I mean the button you can click that's usually under your scroll-wheel. Press on the mouse wheel and MOUSE3 should click - that's the one I mean.


Edited by Xupicor
  • Like 1
  • Windows 11 Pro, RTX4090 (24GB), 5950X @ 4.3GHz, 64GB RAM @ 3000MHz, M.2 SSD 8TB, Pimax Crystal
  • Modules and maps: All of 'em. (It's a problem...)
Link to comment
Share on other sites

  • 3 months later...
  • 2 months later...
  • 2 weeks later...
  • 6 months later...
  • 2 months later...

Not a fix, but a workaround without the need to modify the installation directory directly:

Well, actually, there is a mod, so it touches the installation directory, but OVGME+Quaggles' Command Injector makes this all much easier now - and after that you only add to the Saved Games, so it's much cleaner (no edit of the Mod in DCS install anymore).


Edited by virgo47
  • Like 1

✈️ L-39, F-5E, F/A-18C, MiG-15, F-86F, C-101, FC3 🛩️ Yak-52, P-47, Spitfire 🚁 UH-1H, Ka-50 III 🗺️ NTTR, PG, SY, Chnl, Norm2 📦 Supercarrier, NS430, WWII 🕹️ VKB STECS+Gladiator/Kosmosima ▶️ DCS Unscripted YouTube

Link to comment
Share on other sites

  • 2 weeks later...

Yes, I'm using Quaggle's input injector mod as well now. You can copy/create whatever bindings from the game's lua to a custom lua file in Saved Games and set up custom controls that don't get wiped with an update - you just reapply the mod and it loads in your custom bindings. Still need to know a bit about bindings and lua, but it works great.

  • Windows 11 Pro, RTX4090 (24GB), 5950X @ 4.3GHz, 64GB RAM @ 3000MHz, M.2 SSD 8TB, Pimax Crystal
  • Modules and maps: All of 'em. (It's a problem...)
Link to comment
Share on other sites

  • 2 months later...
  • Recently Browsing   0 members

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