2

This question is a bit like this old one I found, but it (and its answers) don't quite cover my use case. I can use xinput as the accepted answer suggests to remap the scroll like this

xinput set-button-map "Primax Kensington Eagle Trackball" 3 2 1 5 4 6 7

However, I can't get it be permanent. The suggested way of placing it in ~/.xsessionrc does not seem to work for me, and even if it did, I believe it wouldn't be suitable for my use case. I'm using a laptop and I regularly unplug everything and move it around, then plug things back in shortly afterwards; this always breaks the input mapping, and I don't believe ~/.xsessionrc would be re-executed.

At the moment, the best solution I've found is to execute the xinput command in the PROMPT_COMMAND function, but that only works as long as I'm working in the terminal. It feels like there should be a way I could associate that device with the mapping permanently, whether it's plugged in or not, but I've been unable to find one. Is there any way to successfully achieve this in Gnome 3?

Vala
  • 168

0 Answers0