9thHunt Posted December 27, 2021 Posted December 27, 2021 (edited) I have a programmable HID button set to send a LeftCtrl+E macro when pressed, it works fine in all of my aircraft except the Hornet. I'm wondering what might be different about the Hornet to make it not accept that command. I checked that tapping LeftCtrl+E on my keyboard 3 times does work in the Hornet, and as I said, this button works in all my other planes, so I'm not sure what is going on here. I got the button on EBay and it came with very little documentation, and it's from China, so I can't count on any support there. Anyone have any ideas? here's a link to the EBay page: https://www.ebay.com/itm/142922652172?_trkparms=amclksrc%3DITM%26aid%3D111001%26algo%3DREC.SEED%26ao%3D1%26asc%3D20160908105057%26meid%3D5d54aebf689c4d5dbceb30bb2e30d8e2%26pid%3D100675%26rk%3D1%26rkt%3D15%26sd%3D142922652172%26itm%3D142922652172%26pmt%3D0%26noa%3D1%26pg%3D2380057&_trksid=p2380057.c100675.m4236&_trkparms=pageci%3A79e34af4-6756-11ec-9789-46683a3e2110|parentrq%3Afda7b04417d0ab97d1ba355dffebf094|iid%3A1 As a side note, does anyone know how to override the push 3 times requirement in DCS? I tried programming the button to send the macro three times, but that didn't seem to work. Edited December 27, 2021 by 9thHunt
rob10 Posted December 27, 2021 Posted December 27, 2021 What are you using to program the macro and how long does it press the key for? DCS seems to need a longer press/hold time for a keystroke to register than some other programs. I use a 50 millisecond hold in AutoHotKey with DCS.
LeCuvier Posted December 27, 2021 Posted December 27, 2021 (edited) I have no idea whether your programmable HID button doesn't work with the Hornet, but I created a command for a simple push button that generates the "eject" command 3 times if I push and release the button just once. I added the following line of code to the file "default.lua" in the folder "...\DCS World OpenBeta\Mods\aircraft\FA-18C\Input\FA-18C\joystick": {pressed = iCommandPlaneEject, down = iCommandPlaneEject, up = iCommandPlaneEject, name = _('Eject (push just once)'), category = _('Systems')}, ...and this creates the new command "Eject (push just once)" which you can bind to a simple push button. I added the same line of code into the "default.lua" of A-10C II, Bf-109K4 and F-16C (just for fun) and it worked there too. Edited August 12, 2022 by LeCuvier 1 1 LeCuvier Windows 10 Pro 64Bit | i7-4790 CPU |16 GB RAM|SSD System Disk|SSD Gaming Disk| MSI GTX-1080 Gaming 8 GB| Acer XB270HU | TM Warthog HOTAS | VKB Gladiator Pro | MongoosT-50 | MFG Crosswind Pedals | TrackIR 5
9thHunt Posted December 28, 2021 Author Posted December 28, 2021 3 hours ago, rob10 said: What are you using to program the macro and how long does it press the key for? DCS seems to need a longer press/hold time for a keystroke to register than some other programs. I use a 50 millisecond hold in AutoHotKey with DCS. It uses software that was provided with the button, it's the same program shown in the description of the auction and that's basically all the documentation I have, so I have no idea if I can change the timing.
Preendog Posted January 6, 2022 Posted January 6, 2022 Did you enable the seat? (yellow handle on right of seat)
Razor18 Posted January 7, 2022 Posted January 7, 2022 (edited) 19 hours ago, Preendog said: Did you enable the seat? (yellow handle on right of seat) That would be pretty obvious from "CHECK SEAT" fault message on the left DDI as soon as you push up the throttle for takeoff... but maybe I'm wrong... Edited January 7, 2022 by Razor18
BuzzU Posted February 4, 2022 Posted February 4, 2022 17 hours ago, CBStu said: Is pushing a button 3 times that difficult? Not if you can count to three. Buzz
McNasty_UK Posted August 12, 2022 Posted August 12, 2022 (edited) LeCuvier, Thank you for this solution. I went to the trouble of making an ejection handle 3D print connected to a LeoBod board the got stuck at the X3 press. YES pressing a keytop three times is an issue ...if you're in VR. I'm yet to venture into file editing but assume Windows notepad or similar is used to edit the .lua file. Hope to try this soon. Edited August 17, 2022 by McNasty_UK
LeCuvier Posted August 12, 2022 Posted August 12, 2022 I recommend you use Notepad++ This post contains a tutorial, and sample code for several aircraft modules: https://forum.dcs.world/topic/270080-lua-editing-for-additional-key-binds-tutorial-no-discussion-here-please/#elControls_4646929_menu LeCuvier Windows 10 Pro 64Bit | i7-4790 CPU |16 GB RAM|SSD System Disk|SSD Gaming Disk| MSI GTX-1080 Gaming 8 GB| Acer XB270HU | TM Warthog HOTAS | VKB Gladiator Pro | MongoosT-50 | MFG Crosswind Pedals | TrackIR 5
LeCuvier Posted August 16, 2022 Posted August 16, 2022 The "default.lua" is not under "Saved Games". It's under "...Eagle Dynamics\DCS World OpenBeta\Mods\aircraft\FA-18C\Input\FA-18C\joystick". If you want to master this coding I recommend you study the tutorial under this post: https://forum.dcs.world/topic/270080-lua-editing-for-additional-key-binds-tutorial-no-discussion-here-please/#elControls_4646929_menu LeCuvier Windows 10 Pro 64Bit | i7-4790 CPU |16 GB RAM|SSD System Disk|SSD Gaming Disk| MSI GTX-1080 Gaming 8 GB| Acer XB270HU | TM Warthog HOTAS | VKB Gladiator Pro | MongoosT-50 | MFG Crosswind Pedals | TrackIR 5
McNasty_UK Posted August 17, 2022 Posted August 17, 2022 (edited) GENIUS !!! It bloomin works !!! Ok to the rest of us dipping a toe into icy programing waters. It helps to find the default.lua file in the right menu ( be that Steam or EA Beta Download ) Quote: It's under "...Eagle Dynamics\DCS World OpenBeta\Mods\aircraft\FA-18C\Input\FA-18C\joystick". Copy the file and name that copy default.BAK Click YES to the " possible file extention error." Next open the default.lua with Notepad++ Use "Find" to find the command line iCommandPlaneEject This will take you where you to where you need to add the following command {pressed = iCommandPlaneEject, down = iCommandPlaneEject, up = iCommandPlaneEject, name = _('Eject (push just once)'), category = _('Systems')}, Now I deleted the original "press three times" command and added the above in its place. Save the file & accept file overwrite. Launch DCS and open the Controls page. Now there will be an added controls box of "Eject push just once" Map your chosen key to this. Fly and BOOOM! You can punch-out with just one click or in my case pull of ejection handle. Just dont " Do a Goose " :¬( F14 RIO's should eject the canopy first..then the seat. Check your history here. Looking at the default.lua file I now kind of see how the commands should be set out and used. The pdf on how-to is starting to crytalise. Thank you for your patience LeCuvier. Bravo McNasty_UK Edited August 17, 2022 by McNasty_UK update 1
LeCuvier Posted August 22, 2022 Posted August 22, 2022 Just a remark: there is no need to delete the original "...press 3 times" command. As long as the new command has a different name, original and added commands coexist without a problem. 1 1 LeCuvier Windows 10 Pro 64Bit | i7-4790 CPU |16 GB RAM|SSD System Disk|SSD Gaming Disk| MSI GTX-1080 Gaming 8 GB| Acer XB270HU | TM Warthog HOTAS | VKB Gladiator Pro | MongoosT-50 | MFG Crosswind Pedals | TrackIR 5
mattjonesgr9 Posted August 23, 2022 Posted August 23, 2022 On 12/27/2021 at 11:24 PM, LeCuvier said: I have no idea whether your programmable HID button doesn't work with the Hornet, but I created a command for a simple push button that generates the "eject" command 3 times if I push and release the button just once. I added the following line of code to the file "default.lua" in the folder "...\DCS World OpenBeta\Mods\aircraft\FA-18C\Input\FA-18C\joystick": {pressed = iCommandPlaneEject, down = iCommandPlaneEject, up = iCommandPlaneEject, name = _('Eject (push just once)'), category = _('Systems')}, ...and this creates the new command "Eject (push just once)" which you can bind to a simple push button. I added the same line of code into the "default.lua" of A-10C II, Bf-109K4 and F-16C (just for fun) and it worked there too. Tried this with notepad++ for the Harrier but it won't work copy and pasted that line into the lua but still not working
Recommended Posts