Possible workaround was discussed on UbuntuForums - you either run manually a script to enable or disable the right-click depending upon whether you are using a JAVA based application.
You could - for example, connect each of the scripts as Keyboard Shortcuts e.g. CTRL+ALT + E to enable and CTRL+ALT + R to disable
Create a script called "hscroll_disable" containing:
DEVICE_NAME='TPPS/2 IBM TrackPoint'
PROP_NAME='Evdev Wheel Emulation Axes'
xinput set-int-prop "$DEVICE_NAME" "$PROP_NAME" 8 4 5 4 5
if [[ $? -eq 0 ]] ; then
zenity --info --text "Horizontal Scrolling Disabled"
else
zenity --error --text "Error disabling horizontal scroll."
fi
Create a script called "hscroll_disable" containing:
DEVICE_NAME='TPPS/2 IBM TrackPoint'
PROP_NAME='Evdev Wheel Emulation Axes'
xinput set-int-prop "$DEVICE_NAME" "$PROP_NAME" 8 6 7 4 5
if [[ $? -eq 0 ]] ; then
zenity --info --text "Horizontal Scrolling Enabled"
else
zenity --error --text "Error enabling horizontal scroll."
fi
Give both scripts execute permission i.e.
chmod +x hscroll_disable
chmod +x hscroll_enable
The two important parts of the scripts are "DEVICE_NAME" and "PROP_NAME"
You can find out which device name to use on your system like this:
xinput list --short
This will give an output similar to:
"Virtual core pointer" id=0 [XPointer]
"Virtual core keyboard" id=1 [XKeyboard]
"ThinkPad Extra Buttons" id=2 [XExtensionKeyboard]
"AT Translated Set 2 keyboard" id=3 [XExtensionKeyboard]
"Video Bus" id=4 [XExtensionKeyboard]
"Macintosh mouse button emulation" id=5 [XExtensionPointer]
"TPPS/2 IBM TrackPoint" id=6 [XExtensionPointer]
Then to find the property-name:
xinput list-props "TPPS/2 IBM TrackPoint"
This will give an output similar to:
Device 'TPPS/2 IBM TrackPoint':
Device Enabled (93): 1
Evdev Axis Inversion (230): 0, 0
Evdev Reopen Attempts (227): 10
Evdev Axis Calibration (228):
Evdev Axes Swap (229): 0
Evdev Middle Button Emulation (231): 1
Evdev Middle Button Timeout (232): 50
Evdev Wheel Emulation (233): 1
Evdev Wheel Emulation Axes (234): 6, 7, 4, 5
Evdev Wheel Emulation Inertia (235): 10
Evdev Wheel Emulation Timeout (236): 200
Evdev Wheel Emulation Button (237): 2
Evdev Drag Lock Buttons (238): 0
Solution reproduced above from "vace117"