Invert mouse axis and arrow keys

I am using XFCE’s Horizontal Reflection on my Display settings. It works fine, the only problem is that the mouse and keyboard work in an akward manner. I would like to invert the mouse X axis and invert left/right arrow keys.

This can be achieved with:

xinput --set-prop 11 169 -1 0 0 0 1 0 0 0 1
xmodmap -e "keycode 113 = Right" ; xmodmap -e "keycode 114 = Left"

To revert to normal:

xinput --set-prop 11 169 1 0 0 0 1 0 0 0 1
xmodmap -e "keycode 113 = Left" ; xmodmap -e "keycode 114 = Right"

The number 11 is the id of the mouse, which can be obtained from: xinput --list

The number 169 is right after the Coordinate Transformation Matrix, in parentheses, obtained from xinput --list-props 11

Replace 11 and 169 with numbers that are specific for the mouse you have.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.