My workplace uses Squish for testing our Java gui, and I recently had an issue where no tests would run properly on my machine, we eventually worked out that this was due to the fact that I use a left-handed mouse, and on windows have set right-click as my primary mouse button. However our squish setup seems to manually call left click, I'm looking to find a way to make squish respect the primary mouse button as set by windows? We use python as our scripting language for Squish tests.
Any help on this front would be appreciated, its definitely an edge-case, but one that took long enough to solve that we don't want to run into it again.
I had a similar problem, but Qt doesn't document this very well in the API documentation, which is very annoying. I had to dig through my squish directory to find the answer. I opened the folder in VSCode and did a search for "primaryButton". I found a file called
mouseconstants.def(atSQUISH_DIR/sdk/common), inside which I found multiple mouse buttons defined as integers. Each is set to a power of 2, which I suppose makes sense, as I believe they're reading the mouseButton parameter as a byte, so each button is associated with a specific bit flag. Nevertheless, here are the values:To solve your problem, I would try to use
16whenever you need a primary ("left") button, and32whenever you need a secondary ("right") click.This may only work on Windows, as there's this note on Squish's API: