Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've an MX Revolution mouse and I've mapped the search key as the button 2 so that I can perform middle click. The desired function that I'm looking for is to be able to use the button to press and hold so I can pan around a 3d model in blender. Instead, I am getting a fast alternation of button press and button release which has a slight delay that is causing the panning to be jerky. The line that I use in .xbindkeysrc looks like this:

"echo 'buttonpress 2 buttonrelease 2' | xmacroplay :0"
    m:0x0 + c:225
    XF86Search

I suspect the problem is the buttonrelease 2 command. but I'm not sure. Is there anyway I can make the button press and hold command until I release the button on the mouse?

share|improve this question

1 Answer 1

Well I have found the answer. I used xdotool instead of xmacroplay and used the following code:

"echo 'mousedown 2' | xdotool - :0" m:0x0 + c:225 "echo 'mouseup 2' | xdotool - :0" release + m:0x0 + c:225 XF86Search

The key is the "release +" feature. without it, the mousedown 2 will force a constant click on middle mouse button. A new code mouseup 2 that is set to activate on release is how to fix it.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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