rohanpsingh / mujoco-python-viewer

Simple renderer for use with MuJoCo (>=2.1.2) Python Bindings.
BSD 2-Clause "Simplified" License
163 stars 24 forks source link

Bugs occur when using 'double click' and 'ctrl and left click or right click' on mac #27

Closed KJaebye closed 1 year ago

KJaebye commented 1 year ago

Hello, I am using mbp m1 to test this viewer with mujoco python bindings.

I found that when I run the basic example by this viewer, mouse actions are wrong on mac.

The bug is "double click" cannot select an object but turn on/off the contact force option( and c button function by keyboard can still work). So I cannot use ctrl + left/right click to give a torque or force on object.

I tested this in MuJoCo simulation by importing a xml file to MuJoCo directly, also on mac, and the "double click" worked and can select the object. So it's not the mujoco issue. Besides, I also tested same version viewer on ubuntu, it works very well.

I suspect there are somethings different on mac. I checked the code but found nothing.

Please have a look, many thanks!

KJaebye commented 1 year ago

I find it was cuased by some apps' shotkey conflicts. Double kick may trigger ctrl+c action so that 'the contact' option turns on/off.

Thus, close apps that have shotkey settings can fix it. Generally dict app may have function of word picker...