3

How can I turn off mouse-wheel emulation with middle mouse button? I need to use middle mouse shortcuts in Blender and that feature covers middle mouse in all aplications. It is possible to turn it off just for Blender? Because I think this feature is very useful in some applications.

OS: Ubuntu 11.10
PC: Lenovo ThinkPad X200

enter image description here

Braiam
  • 67,791
  • 32
  • 179
  • 269
xdonko
  • 51
  • Please describe your mouse. Is the middle button just a button (like the left and right button), or is it a wheel? – Prateek Nov 06 '11 at 11:56

2 Answers2

2

I fixed it by changing Blender to "Emulate 3 Button Mouse" and turning off opening context menu by Alt+RightMouse. How do I disable the alt-right click keyboard binding? It's just advice for Blender users, I don't find option for turn off scrolling in CCSM. :(

xdonko
  • 51
0

You can disable mouse wheel emulation using xinput

$ xinput set-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation" 0

Or with libinput, it might be:

$ xinput set-prop "TPPS/2 IBM TrackPoint" "libinput Scroll Method Enabled" 0 0 0

I run blender using the following wrapper script. It will monitor the window and turn off wheel emulation while it is focused however it will probably get confused if you have multiple Blender windows open.

#!/bin/bash
DEVICE="TPPS/2 IBM TrackPoint"
PROP="libinput Scroll Method Enabled"
LIBINPUT=1

if [[ $PROP == "libinput"* ]] ; then
    ENABLE="0 0 1"
    DISABLE="0 0 0"
else
    ENABLE="1"
    DISABLE="0"
fi

blender "$@" &
BLENDER_ID=$(xdotool search --sync --limit 1 --classname Blender)
( xprop -id $BLENDER_ID -spy _NET_WM_STATE ; echo ) | while read ; do 
  if [[ $REPLY == *_NET_WM_STATE_FOCUSED* ]] ; then
    xinput set-prop "$DEVICE" "$PROP" $DISABLE 
  else
    xinput set-prop "$DEVICE" "$PROP" $ENABLE
  fi
done

If you don't have xdotool, remove the -id $(...) option from the xprop call and you will just have to click on the Blender window after running the script.

EDIT: I switched distros and had to make the one-liner into a script to handle the libinput property

pix
  • 523