shilka Posted March 16, 2011 Share Posted March 16, 2011 Not necessarily the command code for LoSetCommand() function but I need a full list of command codes for cockpit events. I found some commands listed in export.lua(the same information is posted on DCS website http://www.digitalcombatsimulator.com/en/dev_journal/lua-export/) but this list is not complete. For example I can deduce that the "Engage Descent Mode" in BS is code 507 but it's not mentioned in the list(It says "To be continued..." in export.lua). I want to map the position of some toggle switches into independent keyboard shortcut so that it can be synchronized with the toggle switches on my HOTAS. For example I want LSHIFT+g for "Gear Down" and RSHIFT+G for "Gear Up" instead of a simple G for "gear lever". I'm editing keyboard.lua and it works fine so far. I can deduce the rest of command code from existing entries in keyboard.lua but an official reference would certainly save me a lot of time... 1 Link to comment Share on other sites More sharing options...
NyZuZ Posted March 16, 2011 Share Posted March 16, 2011 I also need it, did you get it Shilka? Link to comment Share on other sites More sharing options...
shilka Posted March 16, 2011 Author Share Posted March 16, 2011 Not yet. The only lead I got so far is to go through other ***.lua files in case the functions are lucky enough to be used somewhere in the official script already. that "to be continued..." is driving me crazy~ Link to comment Share on other sites More sharing options...
shilka Posted March 16, 2011 Author Share Posted March 16, 2011 ok I found it. It's in a file \Scripts\Aircrafts\Ka-50\Cockpit\command_defs.lua Link to comment Share on other sites More sharing options...
SilentEagle Posted March 17, 2011 Share Posted March 17, 2011 I'm curious to know what the device and action numbers mean in the Macro_sequences.lua file. That file contains auto-start, auto-stop, and auto-lights macros. You can easily tell what the engine start/stop (action 311, 312, 313, 314) and canopy open close (action 71) actions are, but the rest have device numbers with actions in the 3000s. I would like to modify my auto-start to be quicker with ground power, but I don't know what all these commands are. Link to comment Share on other sites More sharing options...
shilka Posted March 17, 2011 Author Share Posted March 17, 2011 Actually these 30xx commands are also in command_defs.lua The problem is that it only tells you they belongs to "button ##". But exactly which button on that device (\scripts\aircrafts\ka-50\cockpit\devices.lua)? That's another story. why don't you just cut their time field to half to see if it works? regardless of the nature of the command code. check the last section of that file: start_command = 3000 device_commands = { Button_1 = start_command + 1; Button_2 = start_command + 2; Button_3 = start_command + 3; Button_4 = start_command + 4; Button_5 = start_command + 5; Button_6 = start_command + 6; .... Link to comment Share on other sites More sharing options...
HILOK Posted November 13, 2013 Share Posted November 13, 2013 Hi guys, any news on that subject? Looking for a comprehensive and detailed list of all lua commands -in and out. Thanks Link to comment Share on other sites More sharing options...
FSFIan Posted October 28, 2014 Share Posted October 28, 2014 I know this is an old thread, but for those future souls who land here by searching for LoSetCommand(), here is how to get a list (see attachment). I added the following code to the beginning of Config/Input/Aircrafts/Default/keyboard/default.lua to get this list (DCS 1.2.10): local lfs = require("lfs") local io = require("io") f = io.open(lfs.writedir()..[[Logs\inputenum.txt]], "w") if f then f:write("\n\n*** fenv:\n") for k, v in pairs(getfenv()) do f:write(tostring(k)) f:write("\t") f:write(tostring(v)) f:write("\n") end f:close() end After that, start DCS, go into options and switch to the "Controls" tab to trigger the export.inputenum.txt DCS-BIOS | How to export CMSP, RWR, etc. through MonitorSetup.lua Link to comment Share on other sites More sharing options...
=Andre= Posted July 28, 2015 Share Posted July 28, 2015 Ian;2215144']I know this is an old thread, but for those future souls who land here by searching for LoSetCommand(), here is how to get a list (see attachment). I added the following code to the beginning of Config/Input/Aircrafts/Default/keyboard/default.lua to get this list (DCS 1.2.10): local lfs = require("lfs") local io = require("io") f = io.open(lfs.writedir()..[[Logs\inputenum.txt]], "w") if f then f:write("\n\n*** fenv:\n") for k, v in pairs(getfenv()) do f:write(tostring(k)) f:write("\t") f:write(tostring(v)) f:write("\n") end f:close() end After that, start DCS, go into options and switch to the "Controls" tab to trigger the export. Thanks a lot [FSF]Ian :thumbup: Gametrix JetSeats thread (in English) , SimShaker addon for bass-shakers thread (in English), Andre's blog, downloads, manuals (in English). [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
cuervo111 Posted May 3, 2018 Share Posted May 3, 2018 That was awesome [FSF]Ian this was driving me crazy. Thanks! DCS Rosetta, my automatic DCS mission and campaign translator: https://forums.eagle.ru/showthread.php?t=233877 Link to comment Share on other sites More sharing options...
Subliminal-SS Posted December 8, 2023 Share Posted December 8, 2023 (edited) FYI for the future explorers If you modify the keybedding in the settings and save the profile you get a diff.lua The diff key contains the id In my example here I was truing to get the free camera which was in the export above as iCommandViewFreeJump 158 So this example marries up to the exported file above where Export.LoSetCommand(158); -- iCommandViewFreeJump 158 ["keyDiffs"] = { ["d158pnilunilcdnilvdnilvpnilvunil"] = { ["added"] = { [1] = { ["key"] = "Z", ["reformers"] = { [1] = "LAlt", [2] = "LCtrl", [3] = "LShift", }, }, }, ["name"] = "F11 Jump to free camera", }, }, } return diff There is also a lot of stuff inside the game installation directories if you CTRL+F for the text from the Options Menu -- Config\Input\UiLayer\keyboard\default.lua {combos = {{key = 'Z', reformers = {'LCtrl' }}}, down = iCommandAccelerate , name = _('Time accelerate' ), category = general}, {combos = {{key = 'Z', reformers = {'LAlt' }}}, down = iCommandDecelerate , name = _('Time decelerate' ), category = general}, {combos = {{key = 'Z', reformers = {'LShift' }}}, down = iCommandNoAcceleration , name = _('Time normal' ), category = general}, Edited December 8, 2023 by Subliminal-SS Link to comment Share on other sites More sharing options...
analina Posted March 16 Share Posted March 16 I found this link with a table documenting the interface. GitHub - laomai0208/DCS-Keyboard-Assistance You can find it in 控制指令表.xlsx. Link to comment Share on other sites More sharing options...
Recommended Posts