Originally Posted by
fleshlightx
Got it to work but recoil needs tweaking as per OP.
Working on G502 with GHub. Should work with any logitech keyboard or mouse in GHub
Ill explain best I can.
1. Extract lua to another location other than desktop (note the location) mines is in Drive F (F:\recoil.lua)
2. Launch GHub > Click on Logitech mouse > Assignments > System
2a. In the list, you'll see the Gkeys and corresponding mouse action (Primary click = G1)
2b. If you don't see Gkeys, enable g-shift then disable, they should appear now
3. Open lua with a text editor (notepad, etc)
3a. Under "Mouse key binds" change "nil" to any of the Gkey from list above but dont include the G in lua text. On mines, I have MP7 set to 6 (6=G6)
3b. 1=G1, 2=G2, 3=G3, etc
3c. G502 has 11 Gkeys so you can only set up to 11 key binds for gun recoils. pick your fav guns. should look like this in lua text: local MP7_key = 6
3d. Note the "local set_off_key" this is to turn off the script. Recommend assigning to Gkey. Mines is set to 9 (9=G9)
3e. Save the lua script
4. Launch GHub > click on profile at the top below "active profile" > click on the script icon at the bottom > Create new script > Edit script
4a. Delete everything inside script box and type in the first line: data = dofile[[D:\Luaname.lua]]
4b. Change the "D:\Luaname.lua" to the location of your lua script.
4c. crtl+s to save
Should work now. You can tell it's working if you press the Gkey assigned to a gun the caps lock light will turn on, on your keyboard. Also, on the desktop, if you press and hold primary key, mouse pointer should move down.
If you assigned "local set_off_key" to a Gkey and press that key, the caps lock light will turn off.