Can't believe I died to a 10 years bug - Keys getting logically stuck

In my case, when I alt+tab, or even press the Windows key to switch to another application, for some reason my right alt and ctrl keys get sticky. I often use the button on the joystick to reset the camera, and then that button doesn’t work. When I try to remap it in OpenTrack, it binds to the r.alt+ctrl+joy_button combination.