On my X230t, there is a tablet button to rotate the screen. I just installed Manjaro gnome, and after updates and some driver installation it works, but somewhat annoyingly. Whenever I press it, it rotates the screen twice, so instead of going from normal to right, it goes from normal to inverted. When pressed once more, it again goes from inverted to normal. I also experienced this sort of behaviour on KDE. It seems that the button registers two button clicks everytime I press it, no matter how short the click is. Is there any way to prevent the button from being pressed multiple times in a given time?
I've also tried enabling bounce keys in the accessibility settings.
Edit: As a temporary workaround, I utilized the other button in tablet mode (shows up as TaskPane when applying shortcuts) with a custom rotate script. However, it was also pressed multiple times in a single click. I managed to get around this by setting up my script so that it could only be run once with an exclusive lock like this. The other answers didn't seem to work for me, I don't know why
At this point, I want to map the rotate button to my custom script, but how do I disable gnome's default rotate function?