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?

link|improve this question
feedback

2 Answers

X has a built-in mechanism for controlling the mouse cursor with the keyboard. Press the Pointer_EnableKeys key to activate this mode (mouse keys mode); it's usually bound to Shift+NumLock.

In mouse keys mode, the keypad arrows move the pointer around, and the other keypad keys emulate buttons (/*- are left, middle, right respectively; + is left double-click, and 0 and . are left press and release).

See mouse keys for more information. By the way, this mode can be enabled on Windows too.

link|improve this answer
Thanks, but I'm afraid mousekeys won't work because I still use the mouse in my right hand to move the cursor. And even if I could reassign the keys used by the mousekeys program, I would have to explicitly change between left, middle or right. With my ahk script I can rest my fingers on the three keys and press any or a combination of them instantly. – typist Jul 22 '11 at 21:47
feedback

You could probably do the same things with Tcl ('tickle').

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.