0

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?

0

The reason why it is triggered twice is because the event is registered on key press rather than key release. Once you press the button, the rotation script starts to run, but at the same time it is preventing the computer to capture key release. As a result, it will see it as a "press-and-hold", thus repeating itself. The easiest way to fix it would be disable the autorepeat for that single key.

To do so, first check the keycode for the rotate button: xinput list which gives you the devices (my keyboard is 12). Thenxinput test 12

Now press the rotate button to find its keycode. Mine is 161.

Finally

xset -r 161

will disable the autorepeat for that key.

  • Oh, I see. I ended up adding a lock onto my custom script so it can only be run one at a time and that fixed it for me. I wasn't able to get rid of gnome's default rotate, and I had switched DEs so I don't really have that problem anymore. – Erik Aug 4 at 0:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.