But yeah, specifically for mining, a trigger lock would be handy.
For info, I use an autohotkey macro, linking mouse buttons to keyboard numberpad.
---
To hold down primary fire (mouse 1) button for mining lasers; (*) fires and (-) shuts down;
NumpadMult:: ; primary fire on
sleep 10
send {Click down} ; push left mouse button and holds
sleep 10
return
NumpadSub:: ; primary fire off
sleep 10
send {Click up} ; release left mouse button
SoundPlay, buz.wav ; optional sound effect ((you need buz.wav in root folder or will return an error))
sleep 10
return
---
Secondary fire button (mouse 2) is also copied to numberpad (/) .. for firing collector limpets
NumpadDiv:: ; secondary
sleep 10
send {Click right} ; click right mouse button
sleep 10
return
---
Not difficult to use (
https://autohotkey.com/) the OP is an interesting request but - with workarounds available and with mining being a little bit niche - not sure how much of a priority the OP can be to devs, as useful as the idea is for some players.