0

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?

0

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.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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