On windows I have an autohotkey script which:
- Only works when caps lock is on
- Generates left, middle and right mouse button events when left control, menu and alt keys are pressed
- Allows holding the keys down (for dragging objects)
Is there an easy way of duplicating this functionality in linux?